|
73 | 73 | "source": [
|
74 | 74 | "# General Tips\n",
|
75 | 75 | "- **Iterate relentlessly**: Small wording changes can make or break behavior.\n",
|
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", |
| 76 | + " - Example: swapping “inaudible” → “intelligible” boosted noisy audio input handling.\n", |
78 | 77 | "- **Prefer bullets over paragraphs**: Clear, short bullets outperform long paragraphs.\n",
|
79 | 78 | "- **Guide with examples**: The model strongly follows onto sample phrases.\n",
|
80 | 79 | "- **Be precise**: Ambiguity or conflicting instructions = degraded performance similar to GPT-5.\n",
|
81 |
| - "- **Control language**: Pin output to a target language if you see drift.\n", |
| 80 | + "- **Control language**: Pin output to a target language if you see unwanted language switching.\n", |
82 | 81 | "- **Fight repetition**: Add a Variety rule to reduce robotic phrasing.\n"
|
83 | 82 | ]
|
84 | 83 | },
|
|
520 | 519 | "metadata": {},
|
521 | 520 | "source": [
|
522 | 521 | "## Language Constraint\n",
|
| 522 | + "Language constraints ensure the model consistently responds in the intended language, even in challenging conditions like background noise or multilingual inputs.\n", |
523 | 523 | "\n",
|
524 | 524 | "- **When to use**: To prevent accidental language switching in multilingual or noisy environments.\n",
|
525 | 525 | "- **What it does**: Locks output to the chosen language to prevent accidental language changes.\n",
|
|
617 | 617 | "metadata": {},
|
618 | 618 | "source": [
|
619 | 619 | "## Reduce Repetition\n",
|
620 |
| - "Prevents “robotic” outputs by encouraging varied phrasing while preserving meaning and brand voice.\n", |
| 620 | + "The realtime model can follow sample phrases closely to stay on-brand, but it may overuse them, making responses sound robotic or repetitive. Adding a repetition rule helps maintain variety while preserving clarity and brand voice.\n", |
621 | 621 | "\n",
|
622 | 622 | "- **When to use**: Outputs recycle the same openings, fillers, or sentence patterns across turns or sessions.\n",
|
623 | 623 | "- **What it does**: Adds a variety constraint—discourages repeated phrases, nudges synonyms and alternate sentence structures, and keeps required terms intact.\n",
|
|
657 | 657 | "id": "7d0da635",
|
658 | 658 | "metadata": {},
|
659 | 659 | "source": [
|
660 |
| - "This is the responses **before** applying the instruction using `gpt-realtime`\n", |
| 660 | + "This is the responses **before** applying the instruction using `gpt-realtime`. The model repeats the same confirmation `Got it`.\n", |
661 | 661 | "\n",
|
662 | 662 | "<img\n",
|
663 | 663 | " src=\"../images/repeat_before.png\"\n",
|
|
818 | 818 | "id": "f5bc3747",
|
819 | 819 | "metadata": {},
|
820 | 820 | "source": [
|
821 |
| - "If you are following a conversation flow prompting strategy, you can specify which conversation state needs to apply the alpha-numeric pronunciations instruction.\n", |
| 821 | + "*Tip: If you are following a conversation flow prompting strategy, you can specify which conversation state needs to apply the alpha-numeric pronunciations instruction.*\n", |
822 | 822 | "\n",
|
823 | 823 | "### Example \n",
|
824 | 824 | "*(taken from the conversation flow of the prompt of our [openai-realtime-agents](https://github.com/openai/openai-realtime-agents/blob/main/src/app/agentConfigs/customerServiceRetail/authentication.ts))*\n",
|
|
882 | 882 | "metadata": {},
|
883 | 883 | "source": [
|
884 | 884 | "## Instruction Following\n",
|
885 |
| - "Like 4.1, if the instructions are conflicting, ambiguous or not clear, Realtime models will perform worse\n", |
| 885 | + "Like GPT-4.1 and GPT-5, if the instructions are conflicting, ambiguous or not clear, the new realtime model will perform worse\n", |
886 | 886 | "\n",
|
887 | 887 | "- **When to use**: Outputs drift from rules, skip phases, or misuse tools.\n",
|
888 | 888 | "- **What it does**: Uses an LLM to point out ambiguity, conflicts, and missing definitions before you ship.\n"
|
|
895 | 895 | "source": [
|
896 | 896 | "### **Instructions Quality Prompt (can be used in ChatGPT or with API)**\n",
|
897 | 897 | "\n",
|
898 |
| - "Use the following prompt to identify problematic areas in your prompt that you can fix.\n", |
| 898 | + "Use the following prompt with GPT-5 to identify problematic areas in your prompt that you can fix.\n", |
899 | 899 | "\n",
|
900 | 900 | "```\n",
|
901 | 901 | "## Role & Objective \n",
|
|
930 | 930 | "```"
|
931 | 931 | ]
|
932 | 932 | },
|
| 933 | + { |
| 934 | + "cell_type": "markdown", |
| 935 | + "id": "e823fcd9", |
| 936 | + "metadata": {}, |
| 937 | + "source": [ |
| 938 | + "### **Prompt Optimization Meta Prompt (can be used in ChatGPT or with API)**\n", |
| 939 | + "\n", |
| 940 | + "This meta-prompt helps you improve your base system prompt by targeting a specific failure mode. Provide the current prompt and describe the issue you’re seeing, the model (GPT-5) will suggest refined variants that tighten constraints and reduce the problem.\n", |
| 941 | + "\n", |
| 942 | + "```\n", |
| 943 | + "Here's my current prompt to an LLM:\n", |
| 944 | + "[BEGIN OF CURRENT PROMPT]\n", |
| 945 | + "{CURRENT_PROMPT}\n", |
| 946 | + "[END OF CURRENT PROMPT]\n", |
| 947 | + " \n", |
| 948 | + "But I see this issue happening from the LLM:\n", |
| 949 | + "[BEGIN OF ISSUE]\n", |
| 950 | + "{ISSUE}\n", |
| 951 | + "[END OF ISSUE]\n", |
| 952 | + "Can you provide some variants of the prompt so that the model can better understand the constraints to alleviate the issue?\n", |
| 953 | + "```" |
| 954 | + ] |
| 955 | + }, |
933 | 956 | {
|
934 | 957 | "cell_type": "markdown",
|
935 | 958 | "id": "e9d05945",
|
|
0 commit comments