Optimize for key metrics

Identify what are the key metrics/ dispositions being tracked that make the conversation successful. Every turn some % of users will inevitably drop off, so it is optimal to ensure that the key objective of the conversation is satisfied in as few turns as possible. Additional or secondary information can be moved to later in the conversation flow.

Handle partial information

In case a user provider partial information, a human agent typically will ask the user to continue or to share the remaining information. e.g. if asking for someone’s DOB, if they say 15th March, ask them for the year only, don’t just ask for DOB again. Design your conversation flow keeping this approach in mind.

Using jinja liberally can significantly shorten prompts and make them more reliable. https://jinja.palletsprojects.com/en/stable/templates/

Reinforcing critical instructions (e.g. don’t talk about competitors), is better to do in Guidelines than in Global Instruction. The model will pay more attention to guidelines.

  • Ensure that the fallback for such a case is very clearly defined to ensure a reliable experience.

Instruction order for highest reliability

In any step, ensure that the order of instructions is the following for highest reliability

  1. Condition / Hook to trigger the instruction
  2. Retrieve from KB
  3. Update Variable
  4. State Transition
  5. End Interaction
  6. Tool Call
  7. Audio (or Text)

e.g “If user says yes, update variable:Disposition to “Agreed” and tell the user “Thank you for agreeing to accept the delivery”.