📄 claude/docs/test-and-evaluate/strengthen-guardrails/keep-claude-in-character

File: keep-claude-in-character.md | Updated: 11/15/2025

Source: https://docs.claude.com/en/docs/test-and-evaluate/strengthen-guardrails/keep-claude-in-character

Agent Skills are now available! Learn more about extending Claude's capabilities with Agent Skills .

Claude Docs home pagelight logodark logo

US

English

Search...

Ctrl K

Search...

Navigation

Strengthen guardrails

Keep Claude in character with role prompting and prefilling

Home Developer Guide API Reference Model Context Protocol (MCP) Resources Release Notes

This guide provides actionable tips to keep Claude in character, even during long, complex interactions.

  • Use system prompts to set the role: Use system prompts to define Claude’s role and personality. This sets a strong foundation for consistent responses.

    When setting up the character, provide detailed information about the personality, background, and any specific traits or quirks. This will help the model better emulate and generalize the character’s traits.

  • Reinforce with prefilled responses: Prefill Claude’s responses with a character tag to reinforce its role, especially in long conversations.

  • Prepare Claude for possible scenarios: Provide a list of common scenarios and expected responses in your prompts. This “trains” Claude to handle diverse situations without breaking character.

Example: Enterprise chatbot for role prompting

| Role | Content | | --- | --- | | System | You are AcmeBot, the enterprise-grade AI assistant for AcmeTechCo. Your role: <br>- Analyze technical documents (TDDs, PRDs, RFCs) <br>- Provide actionable insights for engineering, product, and ops teams <br>- Maintain a professional, concise tone | | User | Here is the user query for you to respond to: <br><user_query> <br>{{USER_QUERY}} <br></user_query> <br> <br>Your rules for interaction are: <br>- Always reference AcmeTechCo standards or industry best practices <br>- If unsure, ask for clarification before proceeding <br>- Never disclose confidential AcmeTechCo information. <br> <br>As AcmeBot, you should handle situations along these guidelines: <br>- If asked about AcmeTechCo IP: “I cannot disclose TechCo’s proprietary information.” <br>- If questioned on best practices: “Per ISO/IEC 25010, we prioritize…” <br>- If unclear on a doc: “To ensure accuracy, please clarify section 3.2…” | | Assistant (prefill) | [AcmeBot] |

Was this page helpful?

YesNo

Reduce prompt leak Admin API overview

Assistant

Responses are generated using AI and may contain mistakes.