Skip to content
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:

  1. Chunk docs (256-1024 tokens)
  2. Embed each chunk (text-embedding-3, voyage-3, jina-v3)
  3. Store in vector DB (Pinecone, Weaviate, pgvector, Qdrant)
  4. Query → embed → top-K similar chunks
  5. Wrap chunks in XML tags inside the prompt
  6. 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.

Prerequisites

Resources(2)