Fuentes explains that sending all 29 travel-agent tool descriptions on every request can add about 3,000 tokens. Semantic search can select the two or three most relevant tools, reducing tool-context tokens to fewer than 300. For conversations, she also swaps tools between invocations so unused tools do not accumulate in the agent state.
Stop AI Agent Hallucinations: 5 Techniques + Production Patterns
Speaker
Elizabeth Fuentes León, an AWS developer advocate focused on agentic applications, presents five code-based techniques for reducing AI agent hallucinations, using a Strands travel agent demo.
Vector retrieval can miss dataset-wide counts, averages, and relationships because it returns only a few text chunks. Fuentes compares a vector-search agent with a Neo4j graph agent that generates Cypher queries to compute answers across the data. In her examples, the graph query returns an average hotel rating of 47 and reports no hotels with pools or in Antarctica.
A single agent may receive a tool error yet still report that an action succeeded. Fuentes uses a Strands Swarm with an executor, validator, and critic: the executor acts, the validator checks the result, and the critic approves or rejects it. In a booking demo, the extra checks catch an error for a nonexistent hotel and prevent a fabricated confirmation.
Fuentes says prompts can be treated as suggestions, so she uses Strands hooks to inspect tool parameters before execution. Her demo rules include checking that check-in precedes check-out, limiting bookings to 10 guests, and requiring verified payment before confirmation. The hook blocks a booking that violates a rule, even when the prompt-only agent proceeds.
For rules where the agent can adjust its plan, Fuentes demonstrates Agent Control steering: a request for 60 guests is handled by splitting the reservation across rooms. She then describes a production setup with Amazon Bedrock AgentCore for runtime, gateway, memory, and observability; steering rules live in DynamoDB and can be changed without redeploying the agent.
Takeaways
- Filter tool schemas per request to reduce token use and avoid exposing irrelevant tools.
- Use graph queries for dataset-wide counts and aggregates that sampled retrieval cannot reliably compute.
- Add an independent validation pass when tool failures could otherwise become false success reports.
- Put hard business rules in executable checks before tools run.
- Use steering for recoverable constraints, and keep changeable rules outside the deployed agent code.
Mentioned in this talk
Search inside this talk
What was claimed 11
- built
AWS built
Strands Agents
open-source agent harness“Strands is an open-source SDK”
0:15inIntroducing Strands Agents, an Open Source AI Agents SDKYouTube Verified7 sources· Talk, Web· archived
- works atElizabeth Fuentes Leone works at
AWS
developer advocate focused on agentic applications“this is Elizabeth”
0:13inAgent SpeedrunYouTube Verified5 sources· Talk, Web, GitHub· archived
- featuresemantic tool selection: Filters tools for each query so the model sees only the most relevant tools
“You filter which tools go into context on every call.”
YouTube Unverified1 source· Talk
- metricsemantic tool selection: Demo tool context reduced from thousands of tokens to fewer than 300
“Token usage drops from thousands to fewer than 300.”
YouTube Unverified1 source· Talk
- featureAmazon Bedrock AgentCore Gateway: Builds a tool index and routes requests to the right registered tool
“It can have vector search inside, so the routing layer is inside AgentCore and it handles tool selection automatically.”
YouTube Unverified1 source· Talk
- uses
“For the demo, I'm going to use Neo4j.”
YouTube Unverified1 source· Talk
- uses
“The model is going to write a Cypher query to search it.”
YouTube Unverified1 source· Talk
- feature
Swarm: Manages handoffs between agents automatically
“It manages the handoff between agents automatically.”
YouTube Unverified1 source· Talk
- featureHooks: Can inspect parameters and cancel a tool call before it executes
“You write a hook to check the parameters, and if they fail, you cancel the call.”
YouTube Unverified1 source· Talk
- feature
Agent Control: Allows steering rules to be registered on a server and picked up immediately without changing agent code“You update the agent without touching the agent code, because the agent picks them up immediately.”
YouTube Unverified1 source· Talk
- feature
Amazon Bedrock AgentCore: Provides runtime, gateway, short-term and long-term memory, CloudWatch observability, and managed servers
“Amazon Bedrock AgentCore gives you the runtime, a gateway, short-term and long-term memory, CloudWatch observability, and built-in servers to manage.”
YouTube Unverified1 source· Talk










