Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions examples/gpt-5/gpt-5-2_prompting_guide.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"source": [
"# GPT-5.2 Prompting Guide\n",
"\n",
"### 1. Introduction\n",
"## 1. Introduction\n",
"\n",
"GPT-5.2 is our newest flagship model for enterprise and agentic workloads, designed to deliver higher accuracy, stronger instruction following, and more disciplined execution across complex workflows. Building on GPT-5.1, GPT-5.2 improves token efficiency on medium-to-complex tasks, produces cleaner formatting with less unnecessary verbosity, and shows clear gains in structured reasoning, tool grounding, and multimodal understanding.\n",
"\n",
Expand All @@ -21,7 +21,7 @@
"id": "4023c2a4",
"metadata": {},
"source": [
"### 2. Key behavioral differences \n",
"## 2. Key behavioral differences \n",
"\n",
"**Compared with previous generation models (e.g. GPT-5 and GPT-5.1), GPT-5.2 delivers:**\n",
"\n",
Expand All @@ -45,11 +45,11 @@
"id": "e2d4ba92",
"metadata": {},
"source": [
"### 3. Prompting patterns \n",
"## 3. Prompting patterns \n",
"\n",
"Adapt following themes into your prompts for better steer on GPT-5.2\n",
"\n",
"#### 3.1 Controlling verbosity and output shape\n",
"### 3.1 Controlling verbosity and output shape\n",
"\n",
"Give **clear and concrete length constraints** especially in enterprise and coding agents. \n",
"\n",
Expand All @@ -74,7 +74,7 @@
"id": "3ccfe408",
"metadata": {},
"source": [
"#### 3.2 Preventing Scope drift (e.g., UX / design in frontend tasks) \n",
"### 3.2 Preventing Scope drift (e.g., UX / design in frontend tasks) \n",
"\n",
"GPT-5.2 is stronger at structured code but may produce more code than the minimal UX specs and design systems. To stay within the scope, explicitly forbid extra features and uncontrolled styling. \n",
"\n",
Expand All @@ -97,7 +97,7 @@
"id": "ea6b2164",
"metadata": {},
"source": [
"#### 3.3 Long-context and recall \n",
"### 3.3 Long-context and recall \n",
"\n",
"For long-context tasks, the prompt may benefit from **force summarization and re-grounding**. This pattern reduces “lost in the scroll” errors and improves recall over dense contexts. \n",
"\n",
Expand All @@ -117,7 +117,7 @@
"id": "9fe53c96",
"metadata": {},
"source": [
"#### 3.4 Handling ambiguity & hallucination risk\n",
"### 3.4 Handling ambiguity & hallucination risk\n",
"\n",
"Configure the prompt for overconfident hallucinations on ambiguous queries (e.g., unclear requirements, missing constraints, or questions that need fresh data but no tools are called). \n",
"\n",
Expand Down Expand Up @@ -154,7 +154,7 @@
"id": "79bd0a69",
"metadata": {},
"source": [
"### 4. Compaction (Extending Effective Context)\n",
"## 4. Compaction (Extending Effective Context)\n",
"\n",
"For long-running, tool-heavy workflows that exceed the standard context window, GPT-5.2 with Reasoning supports response compaction via the /responses/compact endpoint. Compaction performs a loss-aware compression pass over prior conversation state, returning encrypted, opaque items that preserve task-relevant information while dramatically reducing token footprint. This allows the model to continue reasoning across extended workflows without hitting context limits.\n",
"\n",
Expand Down Expand Up @@ -248,7 +248,7 @@
"id": "c0266672",
"metadata": {},
"source": [
"### 5. Agentic steerability & user updates \n",
"## 5. Agentic steerability & user updates \n",
"\n",
"GPT-5.2 is strong on agentic scaffolding and multi-step execution when prompted well. You can reuse your GPT-5.1 <user_updates_spec> and <solution_persistence> blocks. \n",
"\n",
Expand All @@ -275,7 +275,7 @@
"id": "2d6e012e",
"metadata": {},
"source": [
"### 6. Tool-calling and parallelism\n",
"## 6. Tool-calling and parallelism\n",
"\n",
"GPT-5.2 improves on 5.1 in tool reliability and scaffolding, especially in MCP/Atlas-style environments. \n",
"Best practices as applicable to GPT-5 / 5.1: \n",
Expand Down Expand Up @@ -304,7 +304,7 @@
"id": "cf1e3959",
"metadata": {},
"source": [
"### 7. Structured extraction, PDF, and Office workflows\n",
"## 7. Structured extraction, PDF, and Office workflows\n",
"\n",
"This is an area where GPT-5.2 clearly shows strong improvements. To get the most out of it:\n",
"\n",
Expand Down Expand Up @@ -339,7 +339,7 @@
"id": "83d5d135",
"metadata": {},
"source": [
"### 8. Prompt Migration Guide to GPT 5.2 \n",
"## 8. Prompt Migration Guide to GPT 5.2 \n",
"\n",
"This section helps you migrate prompts and model configs to GPT-5.2 while keeping behavior stable and cost/latency predictable. GPT-5-class models support a reasoning_effort knob (e.g., none|minimal|low|medium|high|xhigh) that trades off speed/cost vs. deeper reasoning. \n",
"\n",
Expand Down Expand Up @@ -375,7 +375,7 @@
"id": "61375ad3",
"metadata": {},
"source": [
"### 9. Web search and research\n",
"## 9. Web search and research\n",
"\n",
"GPT-5.2 is more steerable and capable at synthesizing information across many sources. \n",
"\n",
Expand Down Expand Up @@ -442,7 +442,7 @@
"id": "bb16d1b9",
"metadata": {},
"source": [
"### 10. Conclusion \n",
"## 10. Conclusion \n",
"\n",
"GPT-5.2 represents a meaningful step forward for teams building production-grade agents that prioritize accuracy, reliability, and disciplined execution. It delivers stronger instruction following, cleaner output, and more consistent behavior across complex, tool-heavy workflows. Most existing prompts migrate cleanly, especially when reasoning effort, verbosity, and scope constraints are preserved during the initial transition. Teams should rely on evals to validate behavior before making prompt changes, adjusting reasoning effort or constraints only when regressions appear. With explicit prompting and measured iteration, GPT-5.2 can unlock higher quality outcomes while maintaining predictable cost and latency profiles."
]
Expand Down
4 changes: 2 additions & 2 deletions registry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2698,6 +2698,6 @@
date: 2025-12-11
authors:
- msingh-openai
- emre-openai
- emreokcular
tags:
- gpt-5.2
- gpt-5.2