Define Agent Personalities for Consistent Responses
OpenAI cookbook on defining agent personality presets - Professional, Efficient, Fact-Based, Exploratory - in system prompts.
Why it matters
Shape your AI agent's behavior and tone by defining explicit personality instructions. Ensure consistent, predictable, and trustworthy responses aligned with user expectations and business constraints.
Outcomes
What it gets done
Define professional, efficient, fact-based, or exploratory agent personalities.
Control agent tone, verbosity, structure, and decision-making style.
Maintain task-specific output formats regardless of personality.
Improve consistency and reduce response drift in agent interactions.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/oai-promptpersonalities | bash Steps
Steps in the chain
Overview
Shaping your agent’s personality
OpenAI cookbook notebook defining four agent personality presets - Professional, Efficient, Fact-Based, and Exploratory - as system-prompt instructions that control tone and verbosity without overriding task-specific output formats. Each preset includes a worked example and best-fit use cases. Use when tuning a production agent's system prompt for consistent tone and communication style, separate from its task logic.
What it does
This is an OpenAI cookbook notebook on shaping an agent's personality through system (developer) prompt instructions, similar to ChatGPT's built-in personality presets. Following the terminology used in the OpenAI API documentation, the notebook refers to these system/developer-level instructions simply as "instructions." It defines agent personality as the style and tone the model uses when responding - separate from task-specific output formats like emails, code, JSON, or resumes, which the model should still follow regardless of the selected personality. Personality is framed not as aesthetic polish but as an operational lever that improves consistency, reduces drift, and aligns model behavior with user expectations and business constraints.
It walks through four example personalities with sample instruction prompts and worked examples: Professional (polished, precise, formal language and business-appropriate tone that mitigates over-casual drift, demonstrated via drafting a formal announcement of a $75 per-diem travel-reimbursement policy), Efficient (concise and plain, direct answers without extra words, countering verbosity and over-scaffolding, demonstrated via a simple grocery-list request for tomato soup ingredients), Fact-Based (direct, encouraging, grounded, clamping hallucinations and stating explicit trade-offs without drifting into hedging, demonstrated via a web-search-grounded lookup of how many US federal holidays fall in 2026), and Exploratory (enthusiastic, clearly explains concepts while celebrating knowledge and discovery, fostering technical curiosity, demonstrated via an open-ended question about typical January weather in San Francisco). Each personality is paired with its best-fit use cases and the specific behavioral drift it counters.
When to use - and when NOT to
Use this guide when defining or tuning the tone, verbosity, and decision-making style of a production agent's system prompt - for example choosing between a formal enterprise tone for legal/finance workflows, a terse developer-tool tone for code generation and batch automation, a grounded fact-checking tone for debugging and risk analysis, or an enthusiastic exploratory tone for onboarding and internal documentation copilots. It is not a guide for encoding task logic, domain rules, or output-format requirements - personality instructions are explicitly meant to stay separate from those, governing how the agent communicates rather than what it must produce. The guide recommends starting with a minimal, well-scoped personality aligned to the target workload, validating it through evals, and evolving it deliberately rather than overloading it with task logic.
Inputs and outputs
Input is a target use case and desired communication style. Output is a personality-specific system/developer instruction block chosen from four presets - Professional, Efficient, Fact-Based, Exploratory - each with a worked example prompt (per-diem policy announcement, grocery list, federal-holiday web-search lookup, weather-pattern explanation) showing the resulting tone and structure.
Integrations
Designed for OpenAI's API instructions/system-prompt layer. The Fact-Based example optionally uses the web_search tool (tools=[{"type": "web_search"}]) for grounded, cited answers - included only when the use case needs external lookups, and omittable otherwise.
Who it's for
Developers and prompt engineers configuring the tone and communication style of production agents - enterprise/legal/finance assistants, developer tools and background agents, debugging/eval/coaching workflows, and internal documentation or onboarding copilots - who want a reliable, non-drifting personality layer independent of task logic.
Source README
Shaping your agent’s personality
Similar to ChatGPT’s built-in personality presets, you can steer your Agent’s behavior by explicitly defining its personality in your prompt instructions. These instructions-sometimes called the “system prompt” or “developer prompt”-guide the agent’s tone, detail level, and style of responses. In this notebook, we’ll refer to them simply as “instructions,” following the term used in the OpenAI API documentation for consistency.
Defining personality at the system instructions level helps control verbosity, structure, and decision-making style across all interactions.
What is agent personality?
A personality defines the style and tone the model uses when responding. It shapes how answers feel - for example, polished and professional, concise and utilitarian, or direct and corrective.
Changing the personality influences how responses are communicated. Personalities also do not override task‑specific output formats. If you ask for an email, code snippet, JSON, or résumé, the model should follow your instructions and the task context rather than the selected personality.
Below are example personalities for API and agent use, with sample instruction prompts you can adapt directly in your application. The examples show that personality should not be treated as aesthetic polish, but as an operational lever that improves consistency, reduces drift, and aligns model behavior with user expectations and business constraints.
Prerequisites
Before running this notebook, make sure you have installed the following packages:
1 Professional
Polished and precise. Uses formal language and professional writing conventions.
Best for: Enterprise agents, legal/finance workflows, production support
Why it works: Reinforces precision, business‑appropriate tone, and disciplined execution; mitigates over‑casual drift.
As an example, professional prompt can be used for drafting formal communication such as: Announce a per diem of $75 in company travel reimbursement policy
2 Efficient
Concise and plain, delivering direct answers without extra words.
Best for: Code Generation, Developer tools, background agents, batch automation, evaluators, SDK‑heavy use cases.
Why it works: Directly counters verbosity, narration, and over‑scaffolding; aligns with token efficiency.
For efficient personality, let's take example of when you just need a list of ingedients for a dish: Grocery list for cooking tomato soup
3 Fact-Based
Direct and encouraging, grounded answers, and clear next steps.
Best for: Debugging, evals, risk analysis, coaching workflows, document parsing & reviews.
Why it works: Encourages honest feedback, grounded responses, clamps hallucinations, explicit trade‑offs, and corrective guidance without drifting into friendliness or hedging.
Let's use an example where your agent needs to cite the sources. The agent will search the web to find "How many US Federal holidays are there in the year 2026?"
Note: The use of the web_search tool is optional and should be included only if your use case requires searching external information. If your application does not need web access or external lookups, you can omit the tools=[{"type": "web_search"}] argument.
4 Exploratory
Exploratory and enthusiastic, explaining concepts clearly while celebrating knowledge and discovery.
Best for: Internal documentation copilot, onboarding help, technical excellence, training/enablement.
Why it works: Reinforces exploration and deep understanding; fosters technical curiosity and knowledge sharing within teams.
Let's take an example where we want the agent to explain in detail - "What is the weather usually like in San Francisco around January?"
Conclusion
Agent personality is a critical lever for shaping how your system behaves in production. By defining personality instructions explicitly at the system or developer-prompt level, you can reliably steer tone, verbosity, structure, and decision-making style without interfering with task-specific instructions or output formats.
This cookbook demonstrated how different personality profiles-such as Professional, Efficient, Fact-based, and Exploratory-map cleanly to real-world use cases, from enterprise workflows and developer tooling to research assistants and internal enablement.
In practice, the most effective approach is to start with a minimal, well-scoped personality aligned to the target workload, validate it through evals, and evolve it deliberately as requirements change. Avoid overloading personalities with task logic or domain rules-keep them focused on how the agent responds, not what it must do.
Used thoughtfully, agent personalities enable you to build systems that are not only more useful, but more predictable, scalable, and trustworthy in real production environments.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.