Skip to navigation

Level 3 complete

Level 3 complete! You’ve reached the highest level of PolyAcademy. You can structure complex projects, design reliable flows, and polish agent speech to production quality.

You covered:

You can now answer without guessing:

  • How should I structure code so it stays maintainable?
  • When should I use a flow vs a function vs a managed topic?
  • How do I enforce strict retry limits while keeping speech natural?
  • What makes agent speech sound human rather than generated?

Level 3 recap quiz

Check your understanding

  • Copy the validation regex into each function
  • Define it once in a utility file and import it everywhere
  • Use conv.functions to share the validation
  • Add the validation to the Behavior field

Answer: Define it once in a utility file and import it everywhere

Define the validation in a utility file and import it with standard Python syntax. Update it in one place, fix it everywhere – this is the core benefit of modular code.

  • Reject the name and repeat the phone number question
  • Accept the name, save it, and still ask for the phone number – handle information in any order
  • Skip the phone number step since the user volunteered different info
  • Exit the flow and start over

Answer: Accept the name, save it, and still ask for the phone number – handle information in any order

Design principle 2 (listen robustly): handle information in any order. If the user gives their name unprompted, save it and continue collecting the phone number. Don’t discard useful information.

  • Hard-code a fixed phrase like ‘Transferring you now’
  • Let the LLM generate the message freely
  • Pass the utterance as a function argument so the LLM generates context-appropriate phrasing with deterministic execution
  • Use a Response Control to replace the agent’s message

Answer: Pass the utterance as a function argument so the LLM generates context-appropriate phrasing with deterministic execution

Passing the utterance as a function argument gives you LLM-generated phrasing (context-aware) with deterministic execution (the handoff always happens). Best of both worlds.

  • The response is too short and needs more detail
  • The explanatory preamble is unnecessary, and the phrasing is too formal – simplify to ‘What’s your phone number?’
  • The agent should ask for email instead
  • The agent should use DTMF input for phone numbers

Answer: The explanatory preamble is unnecessary, and the phrasing is too formal – simplify to ‘What’s your phone number?’

Two issues: the explanatory statement (‘In order to…’) is filler the user can infer from context, and ‘Could you please provide me with’ is overly formal. Combine into a single natural question.

What’s next?

You’ve completed all three levels. From here, the reference docs and maintain guides are your ongoing companions: