GPT-5.2 Prompting Guide
by OpenAI
OpenAI's own migration and steering manual for getting production behaviour out of GPT-5.2.
Overview
OpenAI's GPT-5.2 Prompting Guide is a Cookbook article aimed at developers moving production prompts onto GPT-5.2, and it runs eleven sections: an introduction, key behavioural differences from earlier models, a prompting-patterns block split into controlling verbosity and output shape, preventing scope drift, long-context and recall, and handling ambiguity and hallucination risk, then compaction for extending effective context, agentic steerability and user updates, tool-calling and parallelism, structured extraction for PDF and Office workflows, a prompt migration guide to GPT-5.2, web search and research, a conclusion and an appendix. The recurring theme is that GPT-5.2 follows instructions more literally and drifts less from user intent, so a vague prompt now yields mediocre output rather than creatively filled-in output. Concrete techniques include clamping length with explicit budgets such as three-to-six sentences or no more than five bullets, enforcing scope with design-system constraint blocks, forcing summarisation and re-grounding on dense long inputs, and returning one-to-three clarifying alternatives instead of guessing. On the API side it documents the reasoning_effort ladder - none, minimal, low, medium, high and xhigh - with a migration mapping that preserves latency and quality profiles, tool descriptions kept to one or two sentences so parallel calls stay safe, JSON schemas with explicit null handling for missing fields, and the Responses compaction endpoint, illustrated with a Python example on the official SDK.
At a Glance
- Topic
- Models
- Level
- Intermediate
- Format
- Guide
- Cost
- Free
- Duration
- ~45-60 min read; also runnable as a Jupyter notebook
- Provider
- OpenAI
- Hands-on
- Yes — code/exercises
- Certificate
- None
What You’ll Learn
- ✓Clamp output length with explicit sentence and bullet budgets
- ✓Pick a reasoning_effort level across the none-to-xhigh ladder
- ✓Use the Responses compaction endpoint to extend effective context
- ✓Prevent scope drift with explicit constraint and design-system blocks
- ✓Write one-to-two sentence tool descriptions that enable safe parallel calls
- ✓Specify JSON extraction schemas with explicit null handling for missing fields
- ✓Migrate GPT-5 and GPT-5.1 prompts while preserving latency and quality
- ✓Emit brief agent status updates only at major phase transitions
Highlights
- •Written by OpenAI from internal evals and customer feedback, not third-party guesswork
- •Documents the reasoning_effort ladder including the newer xhigh setting
- •The compaction section covers an API surface most prompting write-ups ignore
- •Includes an explicit prompt-migration section rather than generic advice
- •Ships as a runnable notebook in the public openai-cookbook repository
Who It’s For
Best For
- ✓Developers migrating production prompts onto GPT-5.2
- ✓Agent builders tuning tool-calling behaviour, parallelism and verbosity
- ✓Teams doing structured extraction from PDFs and Office documents
Prerequisites
- •Comfortable calling the OpenAI Responses API from Python
- •Prior experience writing system prompts for a reasoning model
FAQ
What is GPT-5.2 Prompting Guide?
OpenAI's official Cookbook guide to prompting GPT-5.2, aimed at developers with prompts already in production on an earlier model. It covers what changed in the model's default behaviour, the prompting patterns that hold up under load, the reasoning-effort and compaction API surfaces, and a section-by-section migration path, with a runnable Python example using the Responses API.
Is GPT-5.2 Prompting Guide free?
GPT-5.2 Prompting Guide is free to access.
What level is GPT-5.2 Prompting Guide for?
GPT-5.2 Prompting Guide is aimed at a intermediate audience. Recommended background: Comfortable calling the OpenAI Responses API from Python, Prior experience writing system prompts for a reasoning model.
How long does GPT-5.2 Prompting Guide take?
Expect roughly ~45-60 min read; also runnable as a Jupyter notebook. Most learners work through it at their own pace.
What will I learn from GPT-5.2 Prompting Guide?
You'll learn: Clamp output length with explicit sentence and bullet budgets; Pick a reasoning_effort level across the none-to-xhigh ladder; Use the Responses compaction endpoint to extend effective context; Prevent scope drift with explicit constraint and design-system blocks; Write one-to-two sentence tool descriptions that enable safe parallel calls; Specify JSON extraction schemas with explicit null handling for missing fields; Migrate GPT-5 and GPT-5.1 prompts while preserving latency and quality; Emit brief agent status updates only at major phase transitions.
Topics
Sources
This page was written from 3 sources, 2 on domains other than developers.openai.com.