Skip to content

Agent answers are wrong or unsafe

When an agent gives a wrong or unsafe answer, the fix is usually in the agent spec, the knowledge source, or the guard layer rather than the model itself.

SymptomLikely cause
Outdated or fabricated factsKnowledge base is missing, stale, or not retrieved.
Off-topic answersSystem prompt is too vague or the evaluation strategy does not constrain the agent.
Tool called with wrong argumentsTool description is unclear or schema is too permissive.
Unsafe outputOutput shield is missing or configured in observe mode only.
Inconsistent qualityMemory window is too large or summarization loses context.
  1. Find the task in the worklog and identify which tools were called and what context was retrieved.

  2. Check the knowledge source — was the right topic queried? Were the top chunks relevant? Is the vector index up to date?

  3. Review the system prompt — is the agent’s role, scope, and output format explicit?

  4. Inspect tool descriptions — does each description explain inputs, outputs, and when to use the tool?

  5. Verify shield configuration — are prompt-injection and content classifiers enabled in the right modes?

  6. Compare versions — did a recent spec change introduce the regression?

  • Update the knowledge base with current documents and verify the retrieval strategy.
  • Tighten the system prompt and add examples of allowed and disallowed responses.
  • Improve tool names and descriptions so the model chooses correctly.
  • Change shield actions from observe to flag or block for higher-risk content.
  • Adjust memory strategy if long conversations lose important context.