|
31 | 31 | "- [Personality and Tone](#personality-and-tone)\n",
|
32 | 32 | " - [Speed Instructions](#speed-instructions)\n",
|
33 | 33 | " - [Language Constraint](#language-constraint)\n",
|
34 |
| - " - [Not Repeating Things (anti-robotic)](#not-repeating-things-anti-robotic)\n", |
| 34 | + " - [Reduce Repetition](#reduce-repetition)\n", |
35 | 35 | "- [Reference Pronunciations](#reference-pronunciations)\n",
|
36 | 36 | " - [Alpha-numeric Pronunciations](#alpha-numeric-pronunciations)\n",
|
37 | 37 | "- [Instructions](#instructions)\n",
|
|
74 | 74 | "# General Tips\n",
|
75 | 75 | "- **Iterate relentlessly**: Small wording changes can make or break behavior.\n",
|
76 | 76 | " - Example: swapping “inaudible” → “intelligible” boosted noisy input handling.\n",
|
| 77 | + "- **Make instructions clear**: The realtime model is excellent at instruction following, so unclear or conflicting instructions will degrade performance.\n", |
77 | 78 | "- **Prefer bullets over paragraphs**: Clear, short bullets outperform long paragraphs.\n",
|
78 | 79 | "- **Guide with examples**: The model strongly follows onto sample phrases.\n",
|
79 | 80 | "- **Be precise**: Ambiguity or conflicting instructions = degraded performance similar to GPT-5.\n",
|
|
613 | 614 | "id": "2f87e782",
|
614 | 615 | "metadata": {},
|
615 | 616 | "source": [
|
616 |
| - "## Not Repeating Things (anti-robotic)\n", |
| 617 | + "## Reduce Repetition\n", |
| 618 | + "Prevents “robotic” outputs by encouraging varied phrasing while preserving meaning and brand voice.\n", |
617 | 619 | "\n",
|
618 |
| - "- **When to use**: If responses recycle phrases and feel robotic.\n", |
619 |
| - "- **What it does**: Forces variation and reduces repetitiveness.\n", |
620 |
| - "- **How to adapt**: Loosen/tighten the rule depending on brand consistency needs." |
| 620 | + "- **When to use**: Outputs recycle the same openings, fillers, or sentence patterns across turns or sessions.\n", |
| 621 | + "- **What it does**: Adds a variety constraint—discourages repeated phrases, nudges synonyms and alternate sentence structures, and keeps required terms intact.\n", |
| 622 | + "- **How to adapt**: Tune strictness (e.g., “don’t reuse the same opener more than once every N turns”), whitelist must-keep phrases (legal/compliance/brand), and allow tighter phrasing where consistency matters." |
621 | 623 | ]
|
622 | 624 | },
|
623 | 625 | {
|
|
1616 | 1618 | "source": [
|
1617 | 1619 | "## Advanced Conversation Flow\n",
|
1618 | 1620 | "\n",
|
1619 |
| - "As use case complexity grows, you need maintainable structure without overloading the model.\n", |
| 1621 | + "As use cases grow more complex, you’ll need a structure that scales while keeping the model effective. The key is balancing maintainability with simplicity: too many rigid states can overload the model, hurting performance and making conversations feel robotic.\n", |
1620 | 1622 | "\n",
|
1621 |
| - "Two patterns for complex scenarios: \n", |
| 1623 | + "A better approach is to design flows that reduce the model’s perceived complexity. By handling state in a structured but flexible way, you make it easier for the model to stay focused and responsive, which improves user experience.\n", |
| 1624 | + "\n", |
| 1625 | + "Two common patterns for managing complex scenarios are:\n", |
1622 | 1626 | "1. Conversation Flow as State Machine\n",
|
1623 | 1627 | "2. Dynamic Conversation Flow via session.updates\n"
|
1624 | 1628 | ]
|
|
1629 | 1633 | "metadata": {},
|
1630 | 1634 | "source": [
|
1631 | 1635 | "### Conversation Flow as State Machine\n",
|
1632 |
| - "This JSON pattern encodes states + transitions so you can reason about coverage and edge cases. It’s easy to diff and extend as your flow grows. You can control in a more granular way the transition from one state to another." |
| 1636 | + "Define your conversation as a JSON structure that encodes both states and transitions. This makes it easy to reason about coverage, identify edge cases, and track changes over time. Since it’s stored as code, you can version, diff, and extend it as your flow evolves. A state machine also gives you fine-grained control over exactly how and when the conversation moves from one state to another." |
1633 | 1637 | ]
|
1634 | 1638 | },
|
1635 | 1639 | {
|
|
1702 | 1706 | "metadata": {},
|
1703 | 1707 | "source": [
|
1704 | 1708 | "### Dynamic Conversation Flow\n",
|
1705 |
| - "In this advanced pattern, we dynamically modify the system prompt and tool list depending on the current state of the conversation. Typically the realtime model would have a tool that allows it to transition to the next phase of the conversation state based on end conditions.\n", |
| 1709 | + "In this pattern, the conversation adapts in real time by updating the system prompt and tool list based on the current state. Instead of exposing the model to all possible rules and tools at once, you only provide what’s relevant to the active phase of the conversation.\n", |
| 1710 | + "\n", |
| 1711 | + "When the end conditions for a state are met, you use session.update to transition, replacing the prompt and tools with those needed for the next phase.\n", |
1706 | 1712 | "\n",
|
1707 |
| - "This reduces cognitive load by showing the model only the current state’s rules and tools. On state change, session.update system prompt + tools to the next phase only.\n" |
| 1713 | + "This approach reduces the model’s cognitive load, making it easier for it to handle complex tasks without being distracted by unnecessary context.\n" |
1708 | 1714 | ]
|
1709 | 1715 | },
|
1710 | 1716 | {
|
|
0 commit comments