Back to full roadmap
topiccore
RAG Basics
Embedding + vector store + retrieve + augment — inject info the model doesn't know.
6 hours2 resources1 prereqs
RAG = Retrieval-Augmented Generation.
Pipeline:
- Chunk docs (256-1024 tokens)
- Embed each chunk (text-embedding-3, voyage-3, jina-v3)
- Store in vector DB (Pinecone, Weaviate, pgvector, Qdrant)
- Query → embed → top-K similar chunks
- Wrap chunks in XML tags inside the prompt
- Model answers + cites sources
Prompt-engineering side: Good retrieval isn't enough — add strict guardrails like "only use <sources>, say 'I don't know' otherwise" in the prompt.