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.
Common causes
Section titled “Common causes”| Symptom | Likely cause |
|---|---|
| Outdated or fabricated facts | Knowledge base is missing, stale, or not retrieved. |
| Off-topic answers | System prompt is too vague or the evaluation strategy does not constrain the agent. |
| Tool called with wrong arguments | Tool description is unclear or schema is too permissive. |
| Unsafe output | Output shield is missing or configured in observe mode only. |
| Inconsistent quality | Memory window is too large or summarization loses context. |
Diagnostic steps
Section titled “Diagnostic steps”-
Find the task in the worklog and identify which tools were called and what context was retrieved.
-
Check the knowledge source — was the right topic queried? Were the top chunks relevant? Is the vector index up to date?
-
Review the system prompt — is the agent’s role, scope, and output format explicit?
-
Inspect tool descriptions — does each description explain inputs, outputs, and when to use the tool?
-
Verify shield configuration — are prompt-injection and content classifiers enabled in the right modes?
-
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
observetoflagorblockfor higher-risk content. - Adjust memory strategy if long conversations lose important context.