> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://poly-ai.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://poly-ai.ferndocs.com/_mcp/server.

# Level 3 complete

> PolyAcademy – You can structure complex projects, design reliable flows, and polish agent speech for production.

> **Tip**
>
> **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:

* [Code organization](/academy/poly-academy/poly-academy-level-3/code-organization): utility files, imports, and the `conv.functions` pattern
* [Flow fundamentals](/academy/poly-academy/poly-academy-level-3/flow-fundamentals): steps, persistent prompts, transitions, and exit behavior
* [Flow patterns](/academy/poly-academy/poly-academy-level-3/flow-patterns): collection, validation, verification, and deterministic vs LLM-led control
* [Writing natural agent speech](/academy/poly-academy/poly-academy-level-3/writing-agent-speech): brevity, tone, avoiding repetitive structure
* [Voice polish](/academy/poly-academy/poly-academy-level-3/voice-polish): filler, turn-taking, personalization, and voice quality

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

#### You need the same phone number validation in 5 different flow functions. What's the best approach?

* 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.

#### A flow collects a phone number in step 1, but users sometimes give their name first. What should happen?

* 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.

#### A user fails identity verification three times. The flow should transfer to a live agent. How do you implement the transfer message?

* 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 agent says 'In order to look up your account, I'll need your phone number. Could you please provide me with that?' – on every single turn. What are two things wrong?

* 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:

#### [Maintain your agent](/academy/maintain/home)

Best practices for keeping a live agent healthy and up to date

#### [Help Center](/agent-studio/get-started/home)

Full reference documentation for every Agent Studio feature

#### [Back to PolyAcademy](/academy/poly-academy/home)

Return to the main learning hub