All courses · Course overview · Lesson sequence
Generative AI and RAG Applications
Build and inspect a synthetic evidence-to-answer workflow. The runnable project uses lexical retrieval, a count-based toy language model, manual vectors and authored templates; it does not run a neural LLM or learned embedding model.
Preparation: Python and API development skills. Learn the concepts before choosing a framework.
24–30 hours; existing syllabus planning estimate, unpiloted
Lesson sequence
- Start with an answer contract · Separate answers for lesson 1
- Understand what a generator does · Separate answers for lesson 2
- Build a source collection you can inspect · Separate answers for lesson 3
- Explain a lexical retrieval baseline · Separate answers for lesson 4
- Compare semantic and hybrid retrieval · Separate answers for lesson 5
- Select context without losing evidence · Separate answers for lesson 6
- Draft only supported claims · Separate answers for lesson 7
- Evaluate the whole question-to-answer path · Separate answers for lesson 8
- Trace failures and state limits · Separate answers for lesson 9
- Defend an evidence-grounded capstone · Separate answers for lesson 10
Practice, project and sources
- Generative AI and RAG Applications: guest-reading edition
- Lesson 1 practice
- Module 2 practice · a generator's decisions
- Module 3 practice · keep a rule attached to its conditions
- Module 4 practice · explain a ranking
- Module 5 practice · combine without overstating
- Module 6 practice · account for selected evidence
- Module 7 practice · claims and authored templates
- Module 8 practice · keep the measurements separate
- Module 9 practice · investigate before changing a component
- Capstone practice · defend the evidence path
- Harbour handbook retrieval lab
- Primary sources and scope ledger
- Course reference
Download and work locally
Includes separate solutions, capstone references and authored expected results. Attempt the tasks first. No runtime or installed dependencies are included.
Download project and reference materials. The Python source is downloaded, never executed on the website. Follow the included project README for commands and limitations.
The reading edition notes explain the practice limits and the historical draft notes retained in the source files.
Read the full authored syllabus and its limitations
Guest-reading edition: see edition scope and limitations. The authoring-status notes in this document describe the original 17 October snapshot.
Generative AI and RAG: answer from evidence
The problem we solve
A fictional help desk has a handbook, older policies and questions written in language the handbook does not use. A fluent answer can cite the wrong version, omit a condition or invent a policy. This course builds an inspectable evidence workflow and explains what changes when a generator enters it.
By the end, a learner should be able to explain generation mechanisms and limits, preserve source identity through chunking, calculate retrieval signals, assemble bounded context, review claims and diagnose failures. The capstone is a reproducible argument about a declared policy on synthetic evidence, not a deployed assistant.
Prerequisites: Python functions, dictionaries, file handling and basic tests. Module 1 requires no vector mathematics; later lessons derive the small calculations they use. Python for AI and Data is a suitable entry route. Deep Learning Foundations is useful background, but no neural training background is required. No FastAPI, cloud account, paid service or model credential is required.
Suggested pace: 24–30 hours including independent exercises and capstone revision, as a design estimate rather than measured learner completion time. All ten lessons and practice/solutions are authored. Predict a result, run the named experiment, explain its output, then attempt practice before reading solutions.
| Module and full lesson | What you will demonstrate | Independent practice | Explained solutions |
|---|---|---|---|
| 1. Start with an answer contract | Preserve conditions, separate evidence from drafting and diagnose two failure types | Practice 1 | Solutions 1 |
| 2. Understand what a generator does | Count/train/decode a toy LM; calculate temperature/attention arithmetic; distinguish words from neural tokens | Practice 2 | Solutions 2 |
| 3. Build a source collection | Trace exact spans; compare windows/paragraphs; expose oversized atoms and version ambiguity | Practice 3 | Solutions 3 |
| 4. Explain a lexical baseline | Derive smoothed TF-IDF/cosine; check arithmetic; inspect cutoff/unknown-term failures | Practice 4 | Solutions 4 |
| 5. Compare semantic/hybrid/rerank concepts | Distinguish learned representations from manual vectors; calculate RRF; bound an exact-term filter's claim | Practice 5 | Solutions 5 |
| 6. Select context | Compare ranking/packet coverage; budget whole quotes; report duplicates/conflicts | Practice 6 | Solutions 6 |
| 7. Draft supported claims | Inspect a source-bound authored template; distinguish support, intent mapping and identity | Practice 7 | Solutions 7 |
| 8. Evaluate the whole path | Separate denominators; aggregate manual labels; design a less-biased comparison | Practice 8 | Solutions 8 |
| 9. Trace failures and state limits | Reproduce budget/source-change traces; keep source instructions as data; bound a handoff | Practice 9 | Solutions 9 |
| 10. Defend the capstone | Complete a selector hook; freeze inputs; compare policies; preserve hard cases and defend a conclusion | Capstone task | Capstone solutions |
Actual execution and assessment boundary
The project performs lexical retrieval, exact text chunking, whole-quote selection and authored template rendering. It also runs a count-based toy LM and manual-vector simulations. It does not run a neural LLM, learned encoder, learned reranker or model judge. Optional future model-study designs are not executed evidence. All supplied questions were visible during development.
The capstone self-review gives equal weight to source/provenance correctness, retrieval/context reasoning, evaluation design and clarity about claims/limits. Polished prose cannot compensate for fabricated execution, concealed unsupported claims or missing conditions. The rubric is formative local feedback, not approved platform pass criteria or a certificate policy. No learner completion or credit logic is integrated.
Scope alongside other Aabha courses
This course builds on document checking in Everyday AI and knowledge-pack design in Codeless Assistants. It does not repeat the FastAPI Equipment Rental API, implement authentication, manage agent tools or teach a deployment pipeline. Tool/action orchestration belongs to Agentic Workflow Engineering; ongoing operations/release monitoring belongs to LLMOps. Scope handoffs do not imply those neighboring packages or any production release are complete.