Skip to content

Conversation

phananh1010
Copy link

Summary

Lightweight LLMs sometimes generate Observation text without invoking a tool. This PR clarifies the system prompt to distinguish tool-use vs. final-answer cases, reducing hallucinated tool results.

Problem

The old prompt mixed Observation into the output template without clear separation. Smaller models often filled it in prematurely, fabricating results even when no tool was called (see #3154).

Solution

Update en.json prompt to:

  • Define two explicit modes:
    1. Tool call → Thought, Action, Action Input, then blank Observation until tool returns.
    2. Final answer → Thought, Final Answer only.
  • Add rules: no Final Answer when calling a tool; no non-empty Observation unless it is the actual tool output.

This removes ambiguity and enforces correct sequencing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant