Lessons
About this phase
Phase 8 taught you what large language models can do; this phase teaches you to make them useful and trustworthy on your data. Retrieval-augmented generation (RAG) connects a model to documents it never saw in training, and LLM application engineering is the discipline of turning a demo into a system: measured retrieval, grounded and cited answers, structured outputs, evaluations that catch regressions, and the production realities of latency, cost, caching, security and privacy. You will build the pipeline piece by piece — embeddings, vector indexes, chunking, hybrid search and reranking, prompt assembly and tool calling — then study the advanced patterns (agentic RAG, GraphRAG), the evaluation craft that separates working systems from demos, and how to choose (or skip) frameworks. The capstone is a cited assistant over your own documents with a real evaluation suite.
By the end you can
- Explain and derive the core math of retrieval: contrastive embedding training, BM25, reciprocal rank fusion, recall@k, MRR and nDCG
- Build a complete RAG pipeline in plain Python, then upgrade it with hybrid search, reranking, structured outputs and tool calling
- Choose chunking strategies, embedding models and vector indexes from measurements on your own data rather than folklore
- Design evaluation suites with golden sets, RAGAS-style metrics and calibrated LLM judges, and trace a system in production
- Budget latency and cost, exploit prompt caching, and defend against prompt injection, data leakage and permission bypass
- Decide when advanced patterns (Self-RAG, GraphRAG, agentic RAG) pay off and when a framework helps or hurts