Skip to content

How to make hand-off decisions more reliable? #541

Closed
@cipriangritto-nordra

Description

@cipriangritto-nordra

Please read this first

  • Have you read the docs?Agents SDK docs - YES
  • Have you searched for related issues? Others may have had similar requests - YES

Question

What is the recommended approach to "convince" the initial Agent / Triage agent to make use of hand-offs more often?

We seem to run into an issue after some point in the conversation (5-10 messages exchanged) where the Triage Agent (both when using GPT-4o and o3-mini) tries to handle the request of the user by itself - often hallucinating the process although it does not have access to the actual tools to complete a task - our guess is that it observes how the specialized agent answers and tries to replicate that behavior.

We are using the recommended prompt prefix for hand-offs, we are providing a hand-off description and the Triage Agent certainly has access to hand-offs, as we observe it both in Traces and in the fact that - for a significant part of the conversation - the AI triggers the hand-off correctly. The quality of the decision-making seems to be degrading over time - or as the Triage Agent has the chance to see how a specialized agent handles the request.

We are preserving context using the newly introduced previous_response_id - but we have noticed this error somewhat in the past as well.

Using agents-as-tools is not fully an option for us as we are actively listening for hand-off events in order to trigger certain custom UI behavior.

Our use case demands that, for casual conversation, the triage agent is not supposed to use any hand-off, but for any specific requests related to the product - it must hand-off to the relevant specialized agent - therefore we cannot force the use of a hand-off tool all the time, unless we're missing a trick here?

Any recommendations?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion about using the SDK

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions