🎯 RAG FLOW — Visual Representation
"What is product warranty?"
⬇️
🧠 Converts question → embedding
📚 Searches vector database
🔎 Finds top relevant documents
Query → Retriever → Relevant Docs
⬇️
📄 Retrieved documents are formatted
🧩 Combined into structured context
Context:
"Product warranty is valid for 2 years..."
⬇️
Both are merged together 👇
-----------------------------------
Use the following context:
Context:
Product warranty is valid for 2 years...
Question:
What is product warranty?
-----------------------------------
✅ Context + Question combined
✅ Sent in ONE call to LLM
⬇️
🤖 Reads context
🧠 Understands question
✍️ Generates final answer
Answer:
The product warranty is valid for 2 years...
🟢 User Question
↓
🔵 Retriever (Search)
↓
🟣 Context Created
↓
🟠 Context + Question
↓
🔴 LLM
↓
✅ Final Answer
Retriever fetches knowledge.
LLM reasons over that knowledge.