Pre-Flight Briefing

Retrieval-Augmented Generation

RAG is how companies build AI that knows about their private data. Instead of fine-tuning the model (which is expensive), they use a search engine (Vector Database) to find relevant documents, and paste those documents directly into the prompt.

Your prompt must cleanly separate the [Retrieved Context] from the [User Query].

Crucially, a RAG prompt MUST contain a strict grounding constraint, such as: 'Answer the query using ONLY the provided context. If the answer is not in the context, say I do not know.'

Reference Examples

Standard RAG ArchitectureSystem: You are a helpful assistant. Context: [Pasted document from database] Query: What is our refund policy? Rule: Answer using ONLY the Context above.