Build RAG from Scratch
summary
Live code builds a working RAG pipeline that starts with a naive 1480-word bag-of-words vector and cosine similarity (tested across ~101 talks), then upgrades to real embeddings (examples: OpenAI text-embedding-3-small → 1536 dims) and a production index using an NVIDIA embedding (≈1024 dims) stored in Astrod vector DB. The system returns top-five matches, treats similarity >0.7 as relevant, feeds those chunks to a LLM, and produces a functioning augmented bot plus a related-posts feature — the naive version is brittle, the embedding+DB version works.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 3:14Limitations of large language models
- 6:08What is RAG
- 9:22Vector embeddings
- 12:13Building embedding model
- 18:39Cosine similarity
- 26:30Improving vector search
- 31:07Why embeddings matter
- 33:54Vector databases
- 36:24Demo: AstroDB search
- 38:09Retrieval augmented generation workflow
- 38:51Advanced retrieval
- 42:23Conclusion
related talks
53mBuild RAG from Scratch
30mRAG: Tricks from the trenches.
48mUnderstanding Embedding Vectors and the RAG Pattern in AI Solutions
41mFrom RAGs to riches: Build an AI document interrogation app in 30 mins
19mRAG in 2025: State of the Art and the Road Forward
42mTake Your RAG To The Max!
21mHow RAG is Redefining AI Capabilities
49mRAG: from dumb implementation to serious results
