Every RAG tutorial I read used LangChain or LlamaIndex and hid the interesting parts. So I built a 500-line RAG pipeline with no frameworks — just pypdf, ChromaDB, and Ollama. The exercise taught me more about embeddings, chunking, and prompt design than a year of using the high-level libraries. Here's the code, the design, and the parts that surprised me.
I Built RAG From Scratch in Python to Understand It. Here's What I Learned.