RAG (Retrieval-Augmented Generation)
RAG is a technique where the AI looks up relevant documents from your knowledge base before answering, instead of relying only on what it learned in training.
Without RAG, an LLM only knows what's in its training data — which has a cutoff date and doesn't include your company's docs, your wiki, or yesterday's customer ticket. With RAG, the system: takes your question, searches a vector store of your docs, finds the most relevant chunks, and pastes them into the model's context before it answers. RAG is the dominant pattern for grounding AI in private data. It's why a customer-support AI can quote your refund policy verbatim and why a code assistant can answer about your codebase. The quality depends mostly on the retrieval, not the model.
Example
Customer asks 'do you ship to Canada?' The AI support employee searches the policies vector store, retrieves the shipping policy chunk, and answers from it instead of guessing.
How OpenLabor uses it
Every OpenLabor employee gets a RAG pipeline over your uploaded documents and connected sources, so answers are grounded in your real data.
How is RAG different from fine-tuning?
RAG injects fresh facts at query time. Fine-tuning bakes patterns into the model weights. RAG wins for changing facts; fine-tuning wins for stable style or domain skill. Most production systems do both.
Why does my RAG system give wrong answers?
Almost always retrieval failures: the right chunk wasn't in the top-K results. Fix by improving chunking, embeddings, or adding a re-ranker before the final retrieval.
Related: vector-store, embedding, hallucination, llm.
AI Labor Glossary