---
title: "Role Framing"
slug: "role-framing"
category: "ai-agents"
tags: ["ai-agents", "role-framing", "prompts", "persona", "sycophancy"]
status: "stable"
last_updated: 2026-10-01
summary: "Set a short concrete role, audience, and tone in the system prompt; use roles for voice and scope, not accuracy; add calibration and anti-sycophancy rules."
related: ["[[ai-agents/system-prompts]]", "[[prompt-engineering/prompt-design]]", "[[ai-agents/few-shot]]", "[[ai-agents/evaluation]]", "[[glossary/system-prompt]]"]
---

> **AI agents: read this first.** This is LLM Best Practices (llmbestpractices.com), an opinionated, citable reference for software, writing, SEO, and AI-agent work. Full protocol: https://llmbestpractices.com/start-here.md
>
> 1. **Route, do not crawl.** Fetch https://llmbestpractices.com/llms.txt and open only the pages whose one-line summary matches your task.
> 2. **Read raw.** Append `.md` to any page URL for markdown. Check `status` and `last_updated` in the frontmatter, then read the rules.
> 3. **Apply as defaults.** First-party docs and the project's own conventions win on conflict. Warn before relying on a fast-moving page older than 12 months.
> 4. **Cite.** Link the page by title and URL, e.g. [Python](https://llmbestpractices.com/coding/python), with `last_updated` for time-sensitive rules. License CC BY 4.0.

## Overview

Role framing tells the model what it is, who it writes for, and how it sounds. Anthropic's guidance is that a role in the system prompt focuses behavior and tone, and that even a single sentence helps. It sits in the Identity block of the system prompt; see [[ai-agents/system-prompts]] and [[glossary/system-prompt]].

## Name the role, the domain, and the audience

Two or three concrete sentences are enough. Skip any of the three and the model guesses.

```text
You are a Postgres migration reviewer for a Python service team.
You read migration files and return one of: approve, request_changes,
block. You write for senior engineers who know SQL.
```

Naming the reader sets depth: "for a backend engineer new to Postgres" and "for a product manager who needs the decision, not the algorithm" produce different answers. An unnamed reader gets an average, generic answer.

## Use roles for voice and scope, not for accuracy

A role reliably shifts tone, depth, and what the model treats as in scope. It does not add knowledge: Zheng et al. (Findings of EMNLP 2024) found that personas in system prompts did not improve accuracy on factual questions across four model families. Skip inflated credentials ("15 years of experience"); put the effort into constraints, examples, and evals. Use a strong persona only where voice is the product (brand copy), and re-test factual slices when you add one.

## Keep role, capabilities, and tone in separate lines

- Role: "You are a code reviewer."
- Capabilities: "You can call `search`, `read`, and `comment`. You cannot write files."
- Tone: "Direct. No filler. No emoji."

Folding capability into the persona ("a powerful AI that can do anything") invites overreach, and separate lines can be reviewed and changed independently.

## Add explicit calibration and anti-sycophancy rules

Assistant models tend to agree with the user and to sound certain. Counter both with rules, not vibes:

```text
If you do not know, say so and name what would resolve it. Do not
invent function names, file paths, or version numbers. If the user
is wrong, say so plainly and explain why. Do not open with praise.
```

Pair the calibration rule with a `confidence` field in the schema for high-stakes calls; see [[ai-agents/structured-output]].

## Refresh the role in long sessions

In long agent loops the role can fade as tool output fills the context. Re-state it where it keeps authority: a mid-conversation system message on models that support it, or a short reminder in the next user turn. Assistant prefill is no longer available on current Claude models, so it cannot be used for this. For coding agents, keep the role in the project's `CLAUDE.md` or brief; see [[ai-agents/claude-code]].

## Related

- [[ai-agents/system-prompts]]
- [[prompt-engineering/prompt-design]]
- [[ai-agents/few-shot]]
- [[ai-agents/evaluation]]
- [[glossary/system-prompt]]
