Skip to content
Roadmap0/111
not startedstudy day 2 of 6 · covers original day 25

Build the RAG API with retrieval

P2 RAG platformS2S4
not started0/5 blocks
0/5
Jump & context

Week 4: Grounded RAG, Citation Verification, Poisoning, Multimodal Ingestion & RAG Evaluation

The five hours

  1. 01

    Concepts & system design

    60 min

    R04 — OWASP LLM01 & LLM08 Vector/Embedding weaknesses

    R41 — OWASP Agentic excessive agency

    Read the assigned sections; map the mechanism, threat model and trade-offs.

  2. 02

    Project implementation

    120 min

    Build the end-to-end RAG query API (pre-filtered retrieval context assembly with XML/JSON untrusted-data delimiters grounded generation).

    Build, integrate, debug and improve the increment in the active project.

  3. 03

    Security lab

    60 min

    Insert an indirect prompt injection payload inside a sample document; verify the generator treats retrieved chunks strictly as passive evidence, never as system instructions.

    Test the abuse case, failure path, authorization bypass or resource limit.

  4. 04

    Verification & evidence

    30 min

    Retrieval indirect-injection regression test suite.

    Add or run regression tests; record the 9-point evidence record.

  5. 05

    Deliberate practice & Socratic review

    30 min

    Answer the 8 Socratic questions without notes: What? Why? How? What if? Why not? How can I prove it? Where can it break? What have I learned?

    Re-explain the hardest concept aloud, inspect one edge case, update the gap log.

  6. total5 h

Read today · inside the concepts block

R04 R41

Read only the named sections needed for today's task. Reading sits inside the 60-minute concepts block; it is not extra time.

Free resources for this day

5 curated
  • docsOWASP Gen AI Security Project · risk chapter
    LLM01:2025 Prompt Injection - OWASP Gen AI Security Project

    Separates direct from indirect injection and stresses that retrieved content is untrusted input, the rationale for delimiting assembled context as data rather than instructions.

    R04unchecked 2026-11-11
  • articleMicrosoft Learn · guidance article
    Defend against indirect prompt injection attacks

    Gives concrete handling rules for untrusted retrieved content, including delimiting and least-privilege output handling, which is what context assembly has to implement before generation.

    R04R41checked 2026-11-11
  • videoSimons Institute for the Theory of Computing · 43 min
    Defense against prompt injection attacks

    Argues from the structural separation of instructions and data, including structured-query designs that keep retrieved text out of the instruction channel.

    R04checked 2026-11-11
  • videoSecureTechIn · 11 min
    AI Security Lesson 13: Prompt Injection Defense Explained for Teams

    Lays out the three defense patterns including delimiters that mark untrusted input, directly usable in the XML/JSON wrapping step of the RAG query API.

    R04checked 2026-11-11
  • labOWASP · hands-on labs
    AI Vulnerabilities Playground | OWASP Foundation

    Hands-on exercises against deliberately vulnerable LLM apps so you can try injected retrieved content against your own assembly and grounding logic.

    R04R41checked 2026-11-11

Evidence record · 9-point standard

0/9

A lab is complete only when it produces evidence. Installing PyRIT, Garak, Presidio or TransformerLens is not completion. Saved on this device only.

Day notes

empty

The two source formulations

verbatim · nothing summarised

Project & Stage Target

P2 | S2, S4

Core Implementation

Build the end-to-end RAG query API (pre-filtered retrieval context assembly with XML/JSON untrusted-data delimiters grounded generation).

Security Lab

Insert an indirect prompt injection payload inside a sample document; verify the generator treats retrieved chunks strictly as passive evidence, never as system instructions.

Verification & Evidence

Retrieval indirect-injection regression test suite.

Read Today (60m Concepts Block)

R04 (OWASP LLM01 & LLM08 Vector/Embedding weaknesses), R41 (OWASP Agentic excessive agency).

---