rlancemartin / karpathy-gpt

https://karpathy-gpt.vercel.app
37 stars 2 forks source link

Karpathy-GPT

Context

This app is a template for using LangChain to build a LLM Q+A assistant from any set of YouTube videos.

We use Karpathy's course on LLMs as an example.

image

We use LangChain to:

(1) convert YouTube urls to text

(2) feed the text into LangChain auto-evaluator to test different chain parameters

(3) with our chosen parameters, build a vectorstore retriever back-end with FastAPI (deployed to Railway)

(4) stream the generated results (answer and retrieved docs) to a front-end (deployed to Vercel)


Step 1: URLs to text

See the notebook in /index folder:

Step 2: Testing

See the text files in /eval folder:

image

Step 3: text to VectorDB

See the notebook in /index folder:

Step 4: Back-end

See the karpathy_app.py file in /api folder:

Step 5: Front-end

See /nextjs directory for nextJS app: