Basic RAG Architecture Components
What you'll learn: You'll identify the four essential building blocks that work together to create a minimal, working RAG system.
The Four Core Components
Now that you understand what RAG does conceptually, let's map out the actual pieces you need to build one. Every basic RAG system consists of exactly four components working in sequence:
1. Embedding Model
This converts text (queries and documents) into vector representations. You've already worked with models like sentence-transformers/all-MiniLM-L6-v2. Without embeddings, you can't do similarity search.
2. Vector Store
This is where your document embeddings live. It could be Pinecone, Chroma, Qdrant, or any vector database you've explored. It performs the similarity search to find relevant documents based on the query embedding.
3. Retriever
This is the logic layer that takes a user's question, converts it to an embedding using your embedding model, queries the vector store, and returns the top-K most relevant documents. Think of it as the coordinator between the user and your knowledge base.
4. LLM (Large Language Model)
This generates the final answer by reading both the user's question and the retrieved documents. The LLM has no memory of your documents—it only sees what the retriever hands it in that moment.
How They Connect
The flow: User question → Retriever (uses embedding model + vector store) → Retrieved docs + question → LLM → Generated answer.
Each component has one job. The embedding model creates the "language" for similarity search. The vector store provides the search engine. The retriever orchestrates retrieval. The LLM synthesizes the final response.
Key Takeaway: A minimal RAG system requires exactly four components—embedding model, vector store, retriever, and LLM—each handling a distinct step in the retrieval-augmented generation pipeline.