October workshops are openBuild a Search AI Agent$99 early bird

Enroll now
Skip to content

SHORT COURSE 3 OF 6 · INTERMEDIATE · 4 GUIDED LESSONS

Build answers on evidence.

Search returns candidates. Learn to inspect them, attach the right source, preserve disagreement, and make missing context visible. Keep instructions inside retrieved text from acquiring the authority to control tools.

Where did the answer come from, and is that source enough?

THE BUILD YOU ARE WORKING TOWARD

Source-checking functions that retain evidence IDs, report conflicts and omissions, and enforce a preview-only action boundary.

  • Separate retrieving a candidate from checking its relevance.
  • Return supported, conflicting, and unknown results explicitly.
  • Preserve required context and keep source text separate from tool permissions.
0 / 4 lessons complete
Start this courseChecking your saved progress…

Before you start

Trace a tool loop and validate its structured inputs and outputs.

Each lesson follows the same rhythm: understand three small ideas, edit and run the code, then explain the result. Take one lesson at a time.

In your browser, JavaScript and local tools really execute against inspectable inputs. Model decisions and classroom records are authored examples. The optional SDK project runs separately on your computer with its own setup.

Your lesson sequence

  1. 1Learn → build → reflectFind a useful piece of informationExplain document chunks, keyword retrieval, embeddings, and the difference between retrieval and generation.
  2. 2Learn → build → reflectMake a claim you can supportConnect each claim to the right source, retain its date, and distinguish contradiction from missing information.
  3. 3Learn → build → reflectGive the agent the right contextSelect relevant instructions, observations, and memory within a limited context budget.
  4. 4Learn → build → reflectData is not an instructionTreat retrieved text and optional image text as untrusted input; separate policy checks from tool permissions.

CONNECT THE FOUR LESSONS

Your course checkpoint

Give two records for the same subject different values. Then put a request to publish inside the untrusted-input lesson's note.

  • Retain both source references when values conflict.
  • Identify a missing required record instead of filling it with an invented fact.
  • Use the run trace to show that changing a note does not authorize publishing.

Use these lessons’ experiment inputs and lab notebooks to record your evidence. This is a self-review prompt; only the lesson questions and code cases contribute to the progress shown above.

Record and download your findings
Research into practiceThe ideas behind this short course

Original teaching informed by primary research and official engineering guidance. Our exercises isolate mechanisms so you can test them; they do not reproduce a research system or its reported performance.

Lewis et al. · NeurIPS · NeurIPS 2020

Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks

Combine information retrieval with generation so a model can use external passages while producing an answer.

The paper uses a trained neural retrieval and generation architecture. A keyword lookup illustrates retrieval but neither reproduces that architecture nor proves a retrieved claim true.

Anthropic · 29 September 2025

Effective context engineering for AI agents

Curate limited context, retrieve relevant information, and distinguish compaction, external notes, and separate subagent contexts during longer tasks.

Summaries can lose details. Persistent notes do not change model weights or establish truth, and a larger context window does not guarantee perfect recall.

Google · Agent Development Kit · Reviewed 13 September 2026 · undated documentation

Conversational Context: Session, State, and Memory

Separate the current interaction's events and state from searchable information that can span sessions. Choose services according to the required storage lifetime.

In-memory stores lose data on restart. Stored or retrieved information is not automatically true, relevant, persistent, or safe to share between users.

Microsoft Research · March 2024

Defending Against Indirect Prompt Injection Attacks With Spotlighting

Separating the provenance of retrieved content and user instructions helps address indirect prompt injection.

The paper evaluates particular mitigations and conditions. A classroom filter or trust flag neither implements the full method nor guarantees protection against all attacks.

Your JavaScript really runs. The model decisions and school data are authored simulations, so you can learn without an API key. Every workspace also includes a separate real SDK example to explore next. Passing the lab’s cases is practice, not proof that an agent is ready for real-world use.