liveBook · Manning

Negative guide

As explained in Build an AI Agent (From Scratch)

A negative guide is an instruction that specifies situations in which a model should not perform a particular action.

A negative guide tells an agent when not to perform an action, especially when deciding whether to invoke a tool. For search tools, it excludes timeless information, fundamental concepts, definitions, and established technical facts. section 2.3.2

Use negative guides to prevent avoidable tool calls:

  • Reduce unnecessary latency and cost by keeping simple questions on a direct-answer path. section 2.3.2
  • Pair exclusions with positive linguistic triggers so the agent can distinguish when a tool is needed from when it is not. section 2.3.2

Search or answer directly

For “What’s Samsung Electronics’ current stock price?”, invoke web search. For “What is the Pythagorean theorem?” or “How do I write a for loop in Python?”, respond directly without searching. section 2.3.2

How Build an AI Agent (From Scratch) covers it

How deep it goes
Explains exclusions, operational consequences, and paired examples, but does not implement a routing mechanism.
Examples
Uses stock-price search, Pythagorean-theorem explanation, and Python for-loop questions to contrast tool use with direct answers.
What it assumes
Assumes an agent with callable tools and teaches the need to specify both positive and negative usage conditions.
What you can do after
Apply agent-prompt design to reduce unnecessary searches and preserve direct answers for established information.
How it connects
Connects negative guides with agent prompts, tool invocation, linguistic triggers, and input-output examples.

This explainer was generated by Manning's knowledge graph from the text of Build an AI Agent (From Scratch). The section links point to the parts of the book it draws on.