What you will be able to do
- Recognize designs that load knowledge on demand through retriever tools, memory recall and skills instead of preloading it
- Apply list-then-fetch retrieval so an agent pulls only the entries a question needs
- Identify ways to scope what a tool returns or reads, such as views, hidden columns, direct asset references and deterministic tools
- Match a symptom in an agent design to the proactive strategy that relieves it
1.Just-in-time retrieval: load knowledge when it is needed
Each turn re-sends the agent's whole context, so knowledge placed in the prompt up front is paid for on every turn, even turns that never use it. Just-in-time retrieval reverses this. Knowledge stays outside the context, and the agent pulls it in only when a question calls for it. Databricks supports several forms of this.
The first is a retriever exposed as a tool. Databricks' guidance on connecting agents to unstructured data shows a VectorSearchRetrieverTool built over a vector search index. The agent receives the tool's definition, not the documents, and decides for itself when to query. That decision depends on a good description, so the docs advise you to provide a descriptive tool_description to help the agent understand the tool and decide when to invoke it.
The second is reusable procedure. A task a team runs often can be captured once in a skill instead of being reasoned out from scratch each time. When a request matches, Genie Code loads the skill and runs its script. A multi-turn task becomes a single low-consumption turn, and the procedure costs nothing in context until it is actually needed.
Just-in-time retrieval depends on the agent deciding when to call the retriever. If the description doesn't make the tool's purpose clear, the agent may skip it when it is needed or call it when it isn't. The first gives worse answers, and the second pulls irrelevant results into context.
Checkpoint 1 of 6· Check yourself
A team pastes a large product manual into its agent's system prompt so the agent can always answer product questions. Most conversations never touch the manual. Which change applies just-in-time retrieval?
A retriever tool keeps the manual out of the standing context, and the agent queries it only when a question needs it. The tool_description is what lets the agent make that call.
“Provide a descriptive tool_description to help the agent understand the tool and determine when to invoke it.”Source: docs.databricks.com
2.Deliberate memory recall: list first, fetch only what you need
Databricks splits agent state into two stores. A session holds the working state of one interaction, most commonly the conversation transcript. Memory holds durable facts recalled across separate conversations, retrieved by semantic search. The two connect at a deliberate point: as a session accumulates, the agent or application distills the durable facts out of it and writes them to memory. The session can then be cleared, and the facts that matter survive in a store that is queried only on demand.
How the agent queries memory is itself a context decision. The managed memory docs say this behavior belongs in the system prompt, and their example instructions open with "Use it deliberately, not by reflex." The example tells the agent to skip memory when the answer doesn't depend on who's asking, and not to re-list what it has already seen that turn. It also describes a two-step pattern. A list call returns short descriptions, and get_memory opens one full entry. For a broad question the agent works from the descriptions and reserves get_memory for the specific entry it needs.
Checkpoint 2 of 6· Check yourself
A user asks a broad question that touches many stored memories. According to the example memory instructions, what should the agent do?
Listing returns compact descriptions. Opening every entry would pull full bodies into context for no gain, so the instructions reserve get_memory for the entry that matters.
“For a very broad question that touches many memories, summarize from the list's descriptions; reserve get_memory for the specific entry you actually need.”Source: docs.databricks.com
Checkpoint 3 of 6· Exam question
A context engineer wants to compare two versions of a RAG agent's system prompt by running both against a held-out set of questions and scoring the responses with an LLM judge for correctness and relevance, then reviewing the results in a dashboard. Which tool is purpose-built for this?
Correct answer: A — MLflow 3 GenAI evaluation, using built-in LLM judges and scorers to compare the prompt versions
- A. Correct. MLflow 3 for GenAI provides built-in LLM judges and custom scorers specifically for evaluating and comparing GenAI application configurations, including system prompt changes, with results viewable through the MLflow UI.
- B. Incorrect. Lakebase branching creates isolated copies of a Postgres database for development and testing; it does not run automated evaluation or scoring of agent responses.
- C. Incorrect. Unity Catalog governs access to data and assets; it has no built-in mechanism for scoring or comparing LLM outputs.
- D. Incorrect. MCP is a protocol for connecting agents to tools and resources, not an evaluation or scoring framework.
3.Tool result scoping: narrow what comes back
Even a minimal tool set called only when needed can flood the context if each call returns too much. Tool result scoping narrows what a tool reads and returns.
Genie Code's guidance names overly broad exploration as a common consumption driver: reading hundreds of assets when only a specific folder is needed. Its fix is to reference the exact table, file or notebook rather than having the agent find it. In an agent design, the matching move is to aim tools at the narrowest scope the task needs.
Scoping can also be built into the data the tools touch. Genie Agents recommend creating views that exclude redundant or non-essential fields from raw tables, or hiding unneeded columns, so queries return only what matters. Trusted assets or views can encapsulate complex queries. Deterministic tools help too. Genie Code's guidance suggests reliable tools such as metric views and Unity Catalog functions for common operations, so the agent calls a known operation and gets a compact, predictable result instead of iterating toward one.
Checkpoint 4 of 6· Check yourself
An agent's SQL tool queries a raw table with dozens of columns, and most of them are irrelevant to the agent's task. Each result bloats the context. Which change scopes the tool's results at the source?
A view that excludes non-essential fields means irrelevant columns never enter the context. The prompt, limit and compaction options all deal with the bloat after it has already arrived.
“create views to exclude redundant or non-essential fields from your raw tables”Source: docs.databricks.com
4.Matching a design symptom to a strategy
Exam scenarios describe an agent design and ask which change would reduce context pressure. Start by finding where the excess tokens come from: standing definitions, preloaded knowledge, oversized results, or one long context stretched across unrelated work. Then pick the strategy that acts at that point.
| Symptom in the design | Proactive strategy |
|---|---|
| Many MCP servers or tools attached, few used | Minimal tool set: disable unused servers; provide only required tools |
| Tools too numerous for one agent's schema | Multi-agent: each specialized agent owns a subset |
| Large reference material preloaded in the prompt | Just-in-time retrieval through a retriever tool or skill |
| Agent reads hundreds of assets or wide raw tables | Tool result scoping: direct references, views, hidden columns |
| One long session spanning unrelated tasks | Distill durable facts to memory; start fresh context per task |
The last row is a boundary, not a reduction inside one context. Genie Code calls starting a new chat for each task the most effective lever, because a fresh context carries no tokens from unrelated work. Related work should still stay together so the agent keeps its context and reuses its prompt cache.
Checkpoint 5 of 6· Match them up
Match each design change to the proactive strategy it represents
Tap a term, then the definition that fits it.
Each change cuts tokens at a different point: the tool definitions loaded, when knowledge enters, how large results are, and which agent carries which tools.
“Provide only the tools and context your agent requires, rather than an unbounded set of APIs or large irrelevant context.”Source: docs.databricks.com
Checkpoint 6 of 6· Exam question
A developer wants an agent to execute governed, reusable business logic (such as a discount calculation) as a callable tool, with the logic managed under the same access controls as the organization's tables, and made available through frameworks like LangChain and OpenAI. Which tool should host this logic?
Correct answer: A — A Unity Catalog function with a documented docstring
- A. Correct. Unity Catalog functions let teams register governed, reusable logic as agent tools with clear docstrings, and Unity Catalog's access controls extend to these functions, with support across multiple agent frameworks.
- B. Incorrect. MLflow 3 scorers evaluate agent output quality; they are not a mechanism for defining callable business logic as a tool.
- C. Incorrect. Lakebase branches are isolated copies of a Postgres database used for development/testing workflows, not a place to define callable business logic.
- D. Incorrect. An MCP resource exposing raw rows provides data access, not a governed, callable computation like a discount calculation.
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.To be safe, an agent should open every stored memory at the start of each turn so it never misses context.Why is that wrong?
Databricks' example memory instructions tell the agent to recall deliberately, skip memory when the answer doesn't depend on the user, and work from list descriptions, opening only the entry it needs.
Covered in Deliberate memory recall: list first, fetch only what you need
2.Letting the agent explore broadly is harmless, because it will discard what it doesn't need.Why is that wrong?
Everything the agent reads while exploring enters its context and is re-sent on later turns. Databricks names broad exploration as a consumption driver and recommends narrow, direct references.
Covered in Tool result scoping: narrow what comes back
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Provide a descriptive tool_description to help the agent understand the tool and determine when to invoke it.”
↩︎ Just-in-time retrieval: load knowledge when it is needed - 2.
“Genie Code recognizes the request, loads the skill, and runs the script rather than planning, generating, and iterating on each run.”
↩︎ Just-in-time retrieval: load knowledge when it is needed“Overly broad exploration: Asking Genie Code to read hundreds of assets when it only needs a specific folder.”
↩︎ Tool result scoping: narrow what comes back“Give Genie Code reliable tools, such as metric views and Unity Catalog functions, for common operations.”
↩︎ Tool result scoping: narrow what comes back“Start a new chat for each task. This is the most effective lever.”
↩︎ Matching a design symptom to a strategy“Overly broad exploration: Asking Genie Code to read hundreds of assets when it only needs a specific folder.”
↩︎ Exam trap 2“point to it with @ instead of asking Genie Code to find it”
↩︎ Prediction - 3.
“As a session accumulates, an agent (or your application) distills the durable facts out of it and writes them to memory.”
↩︎ Deliberate memory recall: list first, fetch only what you need - 4.
“Use it deliberately, not by reflex.”
↩︎ Deliberate memory recall: list first, fetch only what you need“For a very broad question that touches many memories, summarize from the list's descriptions; reserve get_memory for the specific entry you actually need.”
↩︎ Deliberate memory recall: list first, fetch only what you need“Skip memory only when the answer truly doesn't depend on who's asking (general knowledge, math, coding) or you already have what you need.”
↩︎ Exam trap 1 - 5.
“Use trusted assets or views to encapsulate complex queries.”
↩︎ Tool result scoping: narrow what comes back“create views to exclude redundant or non-essential fields from your raw tables”
↩︎ Checkpoint - 6.
“You have so many tools that fitting them all into one agent's schema is impractical; each agent can own a subset.”
↩︎ Matching a design symptom to a strategy“Provide only the tools and context your agent requires, rather than an unbounded set of APIs or large irrelevant context.”
↩︎ Checkpoint