LLM Engineering and AI Security | Nesqual TechCourse outline
LLM application architecture
- The theory an LLM engineer actually needsLesson30 min
- Anatomy of a chat API callLesson30 min
- Cost and latency mathsLesson30 min
- The four patterns: single call, chain, RAG and agentLesson30 min
- A reference architecture and its trust boundariesLesson35 min
- Chapter quiz: LLM application architectureQuiz15 min
Advanced prompt engineering
- Prompts as codeLesson30 min
Designing few-shot examples
Lesson30 min
Decomposition and reasoning stepsLesson30 minWorking with long contextLesson30 minVersioning, testing and failure analysisLesson35 minChapter quiz: advanced prompt engineeringQuiz15 minLab: a prompt template engine with escaping and regression testsLab40 minStructured output and tool use
- Getting reliable JSON from a modelLesson30 min
- Schemas, validation and repair loopsLesson35 min
- Tool calling end to endLesson35 min
- Designing good toolsLesson30 min
- Parallel calls and a robust dispatcherLesson30 min
- Chapter quiz: structured output and tool useQuiz15 min
- Lab: a strict validator and dispatcher for tool callsLab40 min
Retrieval-augmented generation in depth
- Ingestion and chunkingLesson30 min
- Embeddings and vector searchLesson30 min
- Lexical search with BM25Lesson30 min
- Hybrid search, reranking and query rewritingLesson30 min
- Grounding and citationsLesson30 min
- Evaluating retrieval and answersLesson35 min
- Chapter quiz: Retrieval-augmented generation in depthQuiz15 min
- Lab: implement BM25 and measure recall at kLab40 min
Agents and orchestration
- The agent loopLesson30 min
- PlanningLesson30 min
- Memory and stateLesson30 min
- Multi-step and multi-agent designsLesson30 min
- Stopping conditions, budgets and failure modesLesson30 min
- Human approval pointsLesson30 min
- Chapter quiz: Agents and orchestrationQuiz15 min
- Lab: an agent loop with a step budget and an approval gateLab40 min
Evaluation and testing
- Why evals are the core engineering disciplineLesson25 min
- Building test setsLesson30 min
- Exact and heuristic checksLesson30 min
- Model-graded checksLesson35 min
- Regression testing prompts and modelsLesson30 min
- Online metrics and experimentsLesson30 min
- Chapter quiz: Evaluation and testingQuiz15 min
- Lab: an eval harness with exact-match and rubric gradersLab40 min
Fine-tuning and adaptation
- Prompt, retrieve or fine-tuneLesson30 min
- Preparing training dataLesson35 min
- Full fine-tuning and what it costsLesson30 min
- LoRA and parameter-efficient fine-tuningLesson35 min
- Distillation from a larger modelLesson30 min
- Evaluating, costing and maintaining a tuned modelLesson30 min
- Chapter quiz: fine-tuning and adaptationQuiz15 min
Threat modelling AI systems
- Assets, actors and trust boundariesLesson30 min
- STRIDE for LLM applicationsLesson30 min
- The OWASP Top 10 for LLM applications in depthLesson35 min
- MITRE ATLAS as a map of attacksLesson25 min
- Worked threat model: an internal policy RAG assistantLesson35 min
- Worked threat model: an IT helpdesk agent with toolsLesson35 min
- Chapter quiz: threat modelling AI systemsQuiz15 min
Prompt injection and jailbreaks
- Direct and indirect prompt injectionLesson30 min
- Why instructions and data cannot be cleanly separatedLesson30 min
- Exfiltration: tools, links and rendered MarkdownLesson30 min
- Jailbreak families and why they workLesson30 min
- Defence in depth against prompt injectionLesson35 min
- Chapter quiz: prompt injection and jailbreaksQuiz15 min
- Lab: stop an indirect prompt injection with privilege separation and an allow-listLab40 min
Attacks on data and models
- Training data poisoning and backdoorsLesson30 min
- Poisoning the knowledge baseLesson30 min
- Prompt extraction and model extractionLesson30 min
- Memorisation and membership inferenceLesson30 min
- Adversarial examples and evasionLesson30 min
- The model supply chainLesson35 min
- Quiz: attacks on data and modelsQuiz15 min
Securing and red teaming LLM applications
- Guardrails for input and outputLesson30 min
- Safe output handlingLesson30 min
- Sandboxing and least privilege for toolsLesson30 min
- Authorisation for agents acting for usersLesson30 min
- Security logging and monitoringLesson30 min
- Running and reporting a red team exerciseLesson35 min
- Quiz: securing and red teaming LLM applicationsQuiz15 min
- Lab: build and red team an output sanitiserLab40 min
Operating in production
- LLMOps: deploy, version and roll backLesson30 min
- Caching and cost controlLesson30 min
- Observability and tracingLesson30 min
- Incident response for AI systemsLesson30 min
- Governance for engineersLesson30 min
- Capstone design review, the exam and career routesLesson35 min
- Quiz: operating in productionQuiz15 min