GithubHelp home page GithubHelp logo

mdjastrzebski / dangpt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tejasq/dangpt

0.0 0.0 0.0 0 B

An AI of Dan Abramov using RAG and GenAI.

Home Page: https://dangpt.vercel.app/

JavaScript 1.67% TypeScript 97.49% CSS 0.84%

dangpt's Introduction

danGPT

OG Image

Try it out at https://dangpt.vercel.app/.

This project showcases how to compose AI services and implement RAG (Retrieval Augmented Generation) with Generative AI.

Here's a breakdown of how it works:

  1. Outside of the scope of this repo, we have scraped a huge amount of data. In this case, Dan's posts.
  2. We then turn all the text we'd like to search into vectors (lists of numbers) using a machine learning model that maps meaning in text to a multidimensional numerical space. "Embedding" the text in vector space using an "embeddings model". In this case, OpenAI's text-embedding-3-small.
  3. We then store those vectors in a vector database. Our weapon of choice here is AstraDB from DataStax.

Then, when a user submits a query, we:

  1. Turn the query into a vector using the same embeddings model.
  2. Search the vector database for the most similar vectors to the query vector, or vectors "near" the query vector in dimensional space.
  3. Retrieve many original texts from the most similar vectors.
  4. Take those original texts and feed them as context into a generative AI model. In this case, OpenAI's gpt-3.5-turbo. The same model behind ChatGPT's free tier.
  5. The generative AI model then generates a response based on the context it was given, prentending to be Dan.

It's worth noting that this is just a silly side project demo and is likely to be wrong. It's more for education than anything else.

dangpt's People

Contributors

tejasq avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.