When someone types "What's our refund policy?" into a company chatbot, it feels like the AI just knows. It doesn't. The model has never seen your documents. It only reads what your system hands it in that moment.
The 6 Steps Between Your Question and the Answer
- Step 1: Ingestion (done in advance)
Your documents are cleaned, split into chunks, converted into embeddings (numerical representations of meaning), and stored in a vector database along with metadata like source, date, and permissions. - Step 2: The question arrives
The user's question is converted into an embedding using the same model. - Step 3: Retrieval
The vector database finds the chunks whose meaning is closest to the question, usually the top 3 to 10. - Step 4: Prompt assembly
Your app builds a prompt: instructions, the retrieved chunks, the conversation history, and the question. - Step 5: Generation
The LLM writes an answer using that context. It is essentially doing an open-book exam. - Step 6: Post-processing
Citations are attached, guardrails run, and the answer is streamed back.
Key Takeaway
The LLM is only one of six steps, and it's rarely the one that breaks. If retrieval returns the wrong chunk, even the best model will confidently answer from the wrong material.
RAG isn't magic. It's a search system with a language model on the end. Treat it like a search problem first and a prompt problem second, and your results will improve fast.
Which step of your RAG pipeline do you understand least?
LinkedIn Post Snippet & Hashtags
Share this key insight directly with your LinkedIn network: