Skip to content

Commit 10429da

Browse files
committed
small nits
1 parent c3893bb commit 10429da

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

examples/Optimize Prompts.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"source": [
77
"# Optimize Prompts\n",
88
"\n",
9-
"This cookbook provides a look into an early version of OpenAI's prompt optimization system. Crafting effective prompts is a critical skill when working with AI models. Even experienced users can inadvertently introduce contradictions, ambiguities, or inconsistencies that lead to suboptimal results. The system demonstrated here helps identify and fix common issues, resulting in more reliable, effective prompts.\n",
9+
"This cookbook provides a look into an early version of OpenAI's prompt optimization system. Crafting effective prompts is a critical skill when working with AI models. Even experienced users can inadvertently introduce contradictions, ambiguities, or inconsistencies that lead to suboptimal results. The system demonstrated here helps identify and fix common issues, resulting in more reliable and effective prompts.\n",
1010
"\n",
1111
"The optimization process uses a multi-agent approach with specialized AI agents collaborating to analyze and rewrite prompts. The system automatically identifies and addresses several types of common issues:\n",
1212
"\n",
@@ -16,7 +16,7 @@
1616
"\n",
1717
"---\n",
1818
"\n",
19-
"**Objective**: This notebook demonstrates best practices for creating a useful and robust agent system and can help you develop more effective prompts for your applications.\n",
19+
"**Objective**: This notebook demonstrates best practices for creating a useful and robust agent system and helps you develop more effective prompts for your applications.\n",
2020
"\n",
2121
"**Cookbook Structure** \n",
2222
"This notebook follows this structure:\n",
@@ -39,7 +39,7 @@
3939
"source": [
4040
"## 1. System Overview\n",
4141
"\n",
42-
"The prompt optimization system uses a collaborative multi-agent approach to analyze and improve prompts. Each agent specializes in detecting or rewriting a specific type of issue:\n",
42+
"The prompt optimization system uses a collaborative multi-agent approach to analyze and improve prompts. Each agent specializes in either detecting or rewriting a specific type of issue:\n",
4343
"\n",
4444
"1. **Dev-Contradiction-Checker**: Scans the prompt for logical contradictions or impossible instructions, like \"only use positive numbers\" and \"include negative examples\" in the same prompt.\n",
4545
"\n",
@@ -49,14 +49,14 @@
4949
"\n",
5050
"4. **Dev-Rewriter**: After issues are identified, this agent rewrites the prompt to resolve contradictions and clarify format specifications while preserving the original intent.\n",
5151
"\n",
52-
"5. **Few-Shot-Rewriter**: Updates inconsistent example responses to align with the rules in the prompt, ensuring that all examples properly comply with the new developer prompt.\n",
52+
"5. **Few-Shot-Rewriter**: Updates inconsistent example responses to align with the rules in the prompt, ensuring all examples properly comply with the new developer prompt.\n",
5353
"\n",
5454
"By working together, these agents can systematically identify and fix issues in prompts."
5555
]
5656
},
5757
{
5858
"cell_type": "code",
59-
"execution_count": null,
59+
"execution_count": 31,
6060
"metadata": {},
6161
"outputs": [],
6262
"source": [
@@ -105,7 +105,7 @@
105105
},
106106
{
107107
"cell_type": "code",
108-
"execution_count": null,
108+
"execution_count": 32,
109109
"metadata": {},
110110
"outputs": [],
111111
"source": [
@@ -468,7 +468,7 @@
468468
" - `format_checker` looks for unclear format specifications\n",
469469
" - `fewshot_consistency_checker` (if examples exist) checks for mismatches between the prompt and examples\n",
470470
"\n",
471-
"Then after parallel checking phase, the workflow handles dependencies carefully:\n",
471+
"After the parallel checking phase, the workflow handles dependencies carefully:\n",
472472
"\n",
473473
"2. **Prompt Rewriting (Conditional)**: The `dev_rewriter` agent only runs if contradiction or format issues were detected. This agent depends on the outputs from:\n",
474474
" - `dev_contradiction_checker` (the `cd_issues` variable)\n",

0 commit comments

Comments
 (0)