openskills.info
Course Preview

Retrieval-Augmented Generation

Retrieval-augmented generation (RAG) combines a large language model with an external knowledge retrieval step: relevant documents are fetched from a corpus and injected into the prompt so the model can answer with up-to-date, grounded information rather than relying solely on its training data.

itArtificial intelligence and machine learning

Don't Panic — Retrieval-Augmented Generation

Retrieval-augmented generation, or RAG, is what happens when a language model is not expected to remember the entire office library, its replacement policies, and the one PDF everyone fears. Before RAG, the usual choices were to paste documents into a prompt until it protested, or train knowledge into model weights and wait for that knowledge to age. RAG retrieves relevant material when a question arrives, then gives that material to the model as context.

The important split is retrieve, then generate. A knowledge base holds documents chopped into chunks, meaning passages small enough to search and fit in the prompt. Each chunk gets an embedding, a numerical representation that lets similar meanings sit near one another. The question gets one too. Search returns nearby chunks, and the model writes an answer from those selected pieces. The library has not been swallowed whole; it has merely been given a very fast, very literal index card system.

This is why RAG is not a product you install with one heroic button. It is an arrangement of components: an embedding model, a search index, a chunking strategy, a language model, and the orchestration between them. Vector search finds semantic neighbors. Keyword search catches exact product names and error codes. Hybrid search combines both because language has the irritating habit of being precise and indirect in the same sentence. A re-ranker can then put the most relevant evidence nearer the front of the queue.

The surprise is that the generator is rarely the first place to blame. If retrieval chooses the wrong chunks, the answer can be fluent, cited, and wrong with remarkable composure. Chunks that are too large bury the useful sentence; chunks that are too small lose its context. A finite context window means there is no safe setting called all of it. Access control and freshness matter for the same reason: the model must receive only current material that the requester may see.

Read the Intro for the full architecture and the decisions around chunking, embeddings, and security. Use the Slides for the offline indexing path and online query path in one view. Keep the Cheatsheet nearby when comparing keyword, vector, and hybrid search or tuning top-k. The Practice tab turns the uncomfortable question into a useful habit: did the right evidence reach the prompt before the answer began talking?

Where this skill leads

Relevant careers

See how this topic contributes to broader role-level skill maps.

Sources