Conversational Disambiguation: Force an agent to uniquely identify the subject of discussion before moving on¶
Imagine an agent that is used by a Business Development Representative to prepare emails to send to prospects.
A first need is to identify precisely the prospect. For that, the Agent has a tool to query a prospect database. However, there are several similarly-named prospect. Thus, several iterations may be required to uniquely identify the prospect.
You would typically implement this with two Core Loop blocks and an exit condition:
The goal of the first Core Loop block is to uniquely identify the prospect, possibly over several turns
The first Core Loop block has no “default next block”, so it remains active over turns
Once ambiguities have been resolved, the first Core Loop block uses the “Set state” virtual tool to set the
prospect_idstate keyThe first Core Loop block has a single exit condition: State has key: prospect_id
Thus, the first Core Loop block passes control to the second Core Loop block, which is tasked with actually working on the properly identified customer