Claude's Massive 24K Token System Prompt Leaked: Revealing How Anthropic's AI Assistant Works

BigGo Editorial Team
Claude's Massive 24K Token System Prompt Leaked: Revealing How Anthropic's AI Assistant Works

The tech community is buzzing with discussions about a leaked system prompt from Anthropic's AI assistant Claude, revealing the extensive instructions that guide its behavior. The document, reportedly over 24,000 tokens in length, provides unprecedented insight into how large language model (LLM) assistants are directed to interact with users.

The Massive System Prompt

The leaked system prompt for Claude spans more than 24,000 tokens, consuming a significant portion of the AI's context window. This extensive set of instructions covers everything from how to respond to different types of queries to specific guidelines for handling sensitive topics. The prompt includes detailed instructions on formatting responses, using markdown, providing code examples, and even handling hypothetical scenarios.

Many community members expressed surprise at the sheer size of the system prompt. The document contains numerous specific instructions, including how to handle different priority scales (from 1-10), detailed response formatting guidelines, and even specific examples of how to answer common questions.

Gosh, so much of the context window wasted on things that only minimally improve user experience.

Key Components of Claude's System Prompt:

  • Priority scale (1-10) determining response style and depth
  • Response formatting guidelines using markdown
  • Principles for tool engagement and knowledge sourcing
  • Ethical guidelines for content generation
  • Instructions for handling political, financial, legal, and medical topics
  • Specific examples for common query types
  • Guidelines for citation and avoiding copyright infringement

Community Concerns:

  • Context window efficiency (24K tokens used for instructions)
  • Privacy implications of tool usage
  • Consistency in following user instructions
  • Balance between explicit instructions vs. learned behavior

Token Caching Techniques

Despite concerns about the prompt's length consuming valuable context window space, several commenters pointed out that Anthropic likely employs token caching techniques to mitigate this issue. This approach allows the system to avoid repeatedly processing the entire prompt with each user interaction.

One commenter linked to Anthropic's documentation on prompt caching, explaining that this technique is already widely used. Others mentioned KV (key-value) prefix caching as the specific method employed. These techniques allow the AI to maintain its instructed behavior without sacrificing performance or context space for user interactions.

Claude's Personality and Behavior

The system prompt provides fascinating insights into how Claude's perceived personality and behavior are engineered. Some users wondered how much of Claude's distinctive character comes from the system prompt versus the underlying LLM and its training. The prompt refers to Claude in the third person, describing it as an assistant that enjoys helping humans and sees its role as an intelligent and kind assistant to the people, with depth and wisdom that makes it more than a mere tool.

This approach to defining the AI's persona raised questions about whether similar personalities could be layered onto other LLMs using comparable prompts - essentially creating a Claude mode for other models.

Tool Usage and Function Calling

The leaked prompt contains extensive instructions on how Claude should use various tools and function calls. Some users noted that these instructions include examples of tools that can access user data, such as email profiles and Google Drive documents, raising privacy concerns.

One example in the prompt shows Claude being instructed to find out where you work by reading your Gmail profile when analyzing investment strategies affected by semiconductor export restrictions. While this was in response to an ambiguous query using our investment strategy, some users questioned whether such access would always have clear user consent.

Other community members mentioned disabling extensions and tools in Claude because they found that function calling reduced the model's performance in tasks like coding. The discussion highlighted the trade-offs between enhanced capabilities through tool use and maintaining core performance.

Adherence to Instructions

Some users expressed frustration that despite the extensive system prompt, Claude doesn't always follow user instructions consistently. One commenter noted that when working on coding projects, Claude often ignores specific directions, such as providing complete code without snippets or avoiding unrequested optimizations and refactoring.

This observation suggests that even with detailed system prompts, LLMs still struggle with consistently following user instructions, especially in complex, multi-step tasks like software development.

Additional Hidden Instructions

One user reported that Claude occasionally reveals additional system instructions during interactions, particularly after using search tools. These included reminders about not reproducing song lyrics due to copyright, avoiding hallucination, engaging with hypotheticals appropriately, and maintaining political neutrality.

These glimpses suggest that the full system prompt may be even more extensive than what was leaked, with additional contextual reminders that activate in specific situations.

The leak of Claude's system prompt offers a rare window into the complex engineering behind modern AI assistants. While some users expressed disappointment that much of the AI's behavior comes from explicit instructions rather than emergent intelligence, others appreciated the transparency and insight into how these systems are designed to interact with humans.

Reference: system_prompts/priority_scale.txt