C_AIG_2412 · Question #31
Drag and Drop Question Match the components of a Retrieval Augmented Generation architecture to the diagram. Answer:
The correct answer is Vector Database; Embedding Model; LLM; Frontend; Backend. RAG Architecture: Drag-and-Drop Explanation What is RAG? Retrieval Augmented Generation (RAG) enhances an LLM by first retrieving relevant information from a knowledge base, then using that context to generate grounded answers. Understanding the data flow clarifies why each…
Question
Drag and Drop Question Match the components of a Retrieval Augmented Generation architecture to the diagram. Answer:
Exhibit
Answer Area
Drag items
Correct arrangement
- Vector Database
- Embedding Model
- LLM
- Frontend
- Backend
Explanation
RAG Architecture: Drag-and-Drop Explanation
What is RAG?
Retrieval Augmented Generation (RAG) enhances an LLM by first retrieving relevant information from a knowledge base, then using that context to generate grounded answers. Understanding the data flow clarifies why each component sits where it does.
Component-by-Component Breakdown
1. Vector Database
Role: The knowledge store - holds pre-encoded document chunks as high-dimensional vectors.
Why position 1: It is the foundation of RAG. Everything retrieval-related depends on what's indexed here. At query time, incoming query vectors are compared against stored vectors to find the most semantically similar chunks.
Common mistake: Confusing it with a traditional SQL/NoSQL database. Vector DBs don't match exact strings - they find semantic neighbors using distance metrics (cosine, dot product).
2. Embedding Model
Role: Converts raw text (documents at index time, queries at runtime) into dense numeric vectors.
Why position 2: It is the bridge between human-readable text and the Vector Database. Without it, neither documents nor user queries can be compared semantically. It operates at both ingestion time (encoding documents) and query time (encoding the user's question).
Common mistake: Assuming the Embedding Model and the LLM are the same model. They are separate - embedding models are optimized for similarity, not generation.
3. LLM
Role: The generative core - receives the user's query plus the retrieved context chunks, then synthesizes a coherent, grounded response.
Why position 3: The LLM is downstream of retrieval. It only acts after relevant context has been fetched. Its job is generation, not retrieval.
Common mistake: Thinking the LLM searches the Vector DB directly. It does not - the Backend orchestrates retrieval and passes context to the LLM as part of the prompt.
4. Frontend
Role: The user-facing interface - captures user queries and displays responses.
Why position 4: It is the entry/exit point for the end user. It sends queries to the Backend and renders the LLM's final output.
Common mistake: Placing Frontend "inside" the AI pipeline. It sits at the application layer and has no direct contact with the Vector DB, Embedding Model, or LLM.
5. Backend
Role: The orchestration layer - receives queries from the Frontend, calls the Embedding Model, queries the Vector Database, constructs the LLM prompt with context, and returns the response.
Why position 5: The Backend is the glue. It coordinates all other components. In many diagrams, it sits centrally in the data flow, but as a distinct architectural box it is grouped with the application layer (alongside the Frontend).
Common mistake: Underestimating the Backend's role. It does not just relay messages - it owns the RAG logic: chunking strategy, re-ranking retrieved results, prompt construction, and response routing.
Summary Flow
User Query
↓
[Frontend] → [Backend]
↓
[Embedding Model] ← encodes query
↓
[Vector Database] ← retrieves top-k chunks
↓
[Backend] builds prompt: query + context
↓
[LLM] ← generates answer
↓
[Backend] → [Frontend] → User
The arrangement (Vector DB → Embedding Model → LLM → Frontend → Backend) likely reflects how the diagram groups AI/data components (1–3) separately from application layer components (4–5), a common pattern in architecture diagrams.
Topics
Community Discussion
No community discussion yet for this question.
