> Guest-reading edition: see [edition scope and limitations](PUBLICATION.md). 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](lessons/01-start-with-an-answer-contract.md) | Preserve conditions, separate evidence from drafting and diagnose two failure types | [Practice 1](exercises/01-evidence-contract.md) | [Solutions 1](solutions/01-evidence-contract.md) | | [2. Understand what a generator does](lessons/02-understand-a-generator.md) | Count/train/decode a toy LM; calculate temperature/attention arithmetic; distinguish words from neural tokens | [Practice 2](exercises/02-generator.md) | [Solutions 2](solutions/02-generator.md) | | [3. Build a source collection](lessons/03-build-a-source-collection.md) | Trace exact spans; compare windows/paragraphs; expose oversized atoms and version ambiguity | [Practice 3](exercises/03-sources-chunks.md) | [Solutions 3](solutions/03-sources-chunks.md) | | [4. Explain a lexical baseline](lessons/04-explain-a-lexical-baseline.md) | Derive smoothed TF-IDF/cosine; check arithmetic; inspect cutoff/unknown-term failures | [Practice 4](exercises/04-lexical.md) | [Solutions 4](solutions/04-lexical.md) | | [5. Compare semantic/hybrid/rerank concepts](lessons/05-compare-semantic-hybrid-rerank.md) | Distinguish learned representations from manual vectors; calculate RRF; bound an exact-term filter's claim | [Practice 5](exercises/05-hybrid.md) | [Solutions 5](solutions/05-hybrid.md) | | [6. Select context](lessons/06-select-context-without-losing-evidence.md) | Compare ranking/packet coverage; budget whole quotes; report duplicates/conflicts | [Practice 6](exercises/06-context.md) | [Solutions 6](solutions/06-context.md) | | [7. Draft supported claims](lessons/07-draft-only-supported-claims.md) | Inspect a source-bound authored template; distinguish support, intent mapping and identity | [Practice 7](exercises/07-generation.md) | [Solutions 7](solutions/07-generation.md) | | [8. Evaluate the whole path](lessons/08-evaluate-the-whole-path.md) | Separate denominators; aggregate manual labels; design a less-biased comparison | [Practice 8](exercises/08-evaluation.md) | [Solutions 8](solutions/08-evaluation.md) | | [9. Trace failures and state limits](lessons/09-trace-failures-and-state-limits.md) | Reproduce budget/source-change traces; keep source instructions as data; bound a handoff | [Practice 9](exercises/09-failures.md) | [Solutions 9](solutions/09-failures.md) | | [10. Defend the capstone](lessons/10-defend-the-capstone.md) | Complete a selector hook; freeze inputs; compare policies; preserve hard cases and defend a conclusion | [Capstone task](exercises/10-capstone.md) | [Capstone solutions](solutions/10-capstone.md) | ## 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.