Whole course on one page
LLM Engineering: RAG, Fine-Tuning & Deployment: 8 lessons, a few lines each. About 5 minutes to read. Use it to preview the course or to revise.
Foundations: Embeddings and Search
1. Why Models Need Your Data opens the one-minute view
A model is trained once, up to a certain date. It has never seen your documents. You must give it the right information.
Steps: 1. Write three questions you need answered · 2. Ask: facts or style? · 3. Choose RAG for changing facts · 4. Try prompting first for style · 5. Write down why you chose each one
✗ Fine-tuning a model to teach it facts that change often ✓ Using RAG for facts that change often
Words: Prompting, Context window, RAG, Fine-tuning
📌 Facts go in through retrieval; behaviour comes from training.
2. Embeddings: Turning Meaning into Numbers opens the one-minute view
An embedding turns text into a list of numbers. Texts with similar meanings get numbers that sit close together.
Steps: 1. Embed each document · 2. Embed the question · 3. Score the closeness · 4. Pick the highest score
✗ Searching only for the exact words in the question ✓ Comparing embeddings to search by meaning
Words: Embedding, Vector, Cosine similarity
📌 Embeddings let computers search by meaning, not only by matching words.
Building a RAG Pipeline
3. Chunking Documents the Right Way opens the one-minute view
A long document is split into small pieces called chunks. Each chunk should hold one clear idea and a label for its source.
Steps: 1. Split on headings and paragraphs · 2. Then split by size · 3. Add a small overlap · 4. Store metadata with each chunk · 5. Compare two chunk sizes
✗ Making chunks very big so nothing is left out ✓ Keeping one clear idea per chunk
Words: Chunk, Overlap, Metadata, Citation
📌 One clear idea per chunk, plus a label saying where it came from.
4. Retrieve, Then Generate with Citations opens the one-minute view
A RAG pipeline first fetches the chunks that best match the question. Then the model answers only from them and cites each source.
Steps: 1. Embed and store all chunks once · 2. Embed the question, fetch top chunks · 3. Put the chunks in the prompt · 4. Ask for an answer with citations · 5. Check each citation
✗ Trusting a citation because a number is shown ✓ Checking that the cited text supports the answer
Words: Vector database, Citation, Hybrid search, Reranking
📌 Retrieve the evidence first, then make the model show its sources.
5. Evaluating RAG Quality opens the one-minute view
RAG can fail in two places. Retrieval may miss the right chunk, or the model may use the chunk badly. Measure both separately.
Steps: 1. Build a golden set · 2. Measure retrieval with recall@k · 3. Grade the answers · 4. Spot-check the model judge · 5. Change one thing and measure again
✗ Trusting an LLM judge without checking it ✓ Comparing the judge's grades with human grades
Words: Golden set, Recall@k, Faithfulness, LLM-as-judge
📌 Test retrieval and answers separately. Fix the ingredients before the cooking.
Fine-Tuning and Shipping to Production
6. When and How to Fine-Tune opens the one-minute view
Fine-tuning trains an existing model a little more on your examples. It mainly changes how the model behaves, not which facts it knows.
Steps: 1. Pick one narrow task · 2. Write clean example pairs · 3. Check for consistency · 4. Hold back a test set · 5. Compare with your best prompt
✗ Collecting thousands of messy examples ✓ Using a few hundred clean, consistent examples
Words: Fine-tuning, LoRA, Test set
📌 Fine-tune for behaviour, retrieve for facts, and compare against a strong prompt.
7. Deploying: Latency, Cost and Monitoring opens the one-minute view
A demo on your laptop is not a product. With real users you must manage speed, cost, failures and logs.
Steps: 1. Stream the response · 2. Route by difficulty · 3. Control the cost · 4. Retry failed calls · 5. Log and review
✗ Logging requests with personal data left in ✓ Removing or masking personal data before logging
Words: Latency, Routing, Prompt caching, Exponential backoff
📌 Ship with timers, budgets and logs. You cannot fix what you cannot see.
8. Project: Ship a Cited Q&A Service opens the one-minute view
You build a question-answering service over documents you are allowed to use. It must cite sources and be measured, not only shown working.
Steps: 1. Chunk and embed the documents · 2. Answer with numbered citations · 3. Measure recall@k on a golden set · 4. Grade faithfulness and fix a failure · 5. Add retries, max_tokens and logging
✗ Showing a few good answers and stopping there ✓ Reporting recall@k and graded faithfulness
Words: Top-k, Golden set, Recall@k, Faithfulness
📌 Build it, cite it, measure it, then harden it with retries and logs.
This page is a summary. It does not replace the lessons, where each idea has an example, pictures and practice.