Study interactive :: Progress tools open in the Study Hub reader.

All lessons in this module

Previous lesson. Module 25: Generative AI & Modern LLM Applications · Next lesson. Generative AI & LLMs Advanced Topics

Generative AI & Modern LLM Applications

This file is the module hub (map + links), not a full textbook chapter. Deep implementation lives under resources/. Work the Day 1-7 study spine below in order. Then return here for deeper links.

Treat early builds as demos or staging apps. Eval and guardrails come before tools that change state (send email, write files, call paid APIs).

Table of Contents


Day 1-7 study spine

Follow this order. Skipping ahead to agents without retrieval eval is a common failure mode.

Day 1. Prompts and structured outputs

Focus: Clear instructions, few-shot examples, and schema-shaped outputs (JSON Schema / tool schemas / typed fields). Prefer a declared schema over “please reply in JSON.”

Do:

Depth: Prompt engineering

Day 2. Embeddings and vector store basics

Focus: Chunk text, embed, store vectors, run similarity search. Know cosine vs Euclidean at a practical level.

Do:

Depth: Vector databases

Day 3. Hybrid RAG and faithfulness / retrieval eval

Focus: Combine BM25 (or keyword) with vector search. Add a rerank step when you have candidates. Evaluate retrieval and faithfulness (does the answer stick to retrieved context?). Do not treat BLEU as your RAG quality metric.

Do:

Depth: RAG comprehensive guide · Advanced RAG

Day 4. Context engineering and prompt caching / cost

Focus: What you put in context (system rules, retrieved chunks, history) drives quality and bill. Learn prefix / prompt caching ideas and basic inference cost levers.

Do:

Depth: GenAI production deployment · Inference basics

Day 5. PEFT decision path (Prompt, then RAG, then LoRA / QLoRA)

Focus: Decide when not to fine-tune. Default order: better prompts, then RAG / tools for facts, then PEFT (LoRA / QLoRA) only when style, format, or domain behavior still fails after eval.

Do:

Depth: PEFT in NLP advanced topics · Transformer fine-tuning guide (decision path)

Day 6. Guardrails, prompt injection, MCP permissions

Focus: Before any tool with side effects, add input/output checks and treat retrieved or user text as untrusted. Learn MCP as a way to expose tools with permissions, not as “give the model everything.”

Do:

Depth: AI agents guide · Security notes in Advanced Topics

Day 7. Agents last, plus a short reasoning-model note

Focus: Agents (plan, tool, observe) come after solid prompts, retrieval, eval, and guardrails. Multi-agent setups are optional demos, not a default production shape.

Reasoning-model note: Some APIs charge extra for longer “thinking” traces. Use them when hard multi-step problems fail under a normal call and your eval shows a clear gain. Skip them for simple extract / classify / RAG answer paths where cost rises without quality lift.

Do:

Depth: AI agents guide · Agentic RAG survey


Prompt engineering

Vector databases

RAG systems

LLM agents (after Days 1-6)

Multi-agent and MCP

Staging and ops checklist


Resources

Comprehensive guides

In this module folder


Next: Run the project tutorial as a demo RAG with citations. Add faithfulness checks before you widen scope.

Recall ::

Why build a RAG system instead of relying on the LLM alone?

RAG retrieves external documents so answers can use knowledge beyond the model's parameters. This module frames RAG as knowledge-augmented AI for document Q&A. Eval retrieval and faithfulness. Do not use BLEU as your main RAG score.

All lessons in this module

Previous lesson. Module 25: Generative AI & Modern LLM Applications · Next lesson. Generative AI & LLMs Advanced Topics