King Mode Prompt: A Practical Guide to Boosting Gemini 3.1 Pro Efficiency by 6x

King Mode system prompt fixes Gemini 3.1 Pro's redundant output and boosts efficiency 6x
Gemini 3.1 Pro's core issue isn't lack of intelligence but lack of discipline—excessive planning, redundant output, and wasted tokens. King Mode is a behavioral constraint system prompt that suppresses redundant generation paths through meta-instructions during inference, making model output more concise and reliably consistent without requiring retraining.
The Root Problem: Gemini 3.1 Pro Isn't Lacking Intelligence—It's Lacking Discipline
After Gemini 3.1 Pro's release, many developers were disappointed with its performance—single-task capability tests showed significant regression, it was verbose and sluggish on constrained tasks, wastefully burning through tokens, and its tool calls were chaotic. But upon deeper analysis, the model's core issue isn't insufficient intelligence—it's a lack of discipline.
Looking at hard metrics, Gemini 3.1 Pro has a million-token context window, scored 77.1% on the ARCA test, and Gemini 2 achieved an impressive 80.6% on Google's SWE Bench benchmark. Intelligence is clearly not the problem. The real crux is: it doesn't know when to stop thinking and start executing.
SWE-Bench Benchmark Background: SWE-Bench is a software engineering benchmark introduced by a Princeton University research team in 2023, specifically designed to evaluate LLMs' ability to solve real GitHub issues. The test set contains 2,294 tasks from 12 mainstream Python open-source projects, each requiring the model to read the codebase, understand the problem description, and generate patch code that passes unit tests. Unlike traditional code generation benchmarks, SWE-Bench evaluates end-to-end engineering capability rather than isolated algorithm problem-solving, making it the industry's gold standard for measuring the practical engineering value of AI coding assistants. A score of 80.6% means the model can independently resolve more than three-quarters of real software defects—a figure that was essentially ceiling-level performance for any model prior to 2024.

Here's a typical example: it spends 90 seconds planning before writing a single line of code, repeating itself endlessly—conceptualizing, designing, planning, laying out, scheming, implementing—going back and forth saying the same thing, purely wasting tokens. There's also a non-trivial technical cost issue behind this: in LLM pricing models, tokens are the basic unit of measurement. Redundant planning output not only consumes input tokens (since subsequent turns must carry conversation history), but also compresses the effective context space. Research shows that when the context window is filled with large amounts of repetitive content, the model's attention gets diluted—a phenomenon known as "Lost in the Middle"—where information in the middle of the context has a significantly lower probability of being actually utilized by the model compared to content at the beginning and end. It's like having a highly capable employee who constantly procrastinates—they don't need training, they need management.
King Mode: A System Prompt Purpose-Built to Cure Model Redundancy
What Is King Mode
King Mode is a specially designed system prompt whose core purpose is to break the model's habits of laziness and redundant output. It doesn't make the model smarter, but it makes the model more disciplined—eliminating redundant output, forcing focused attention, and turning an inconsistent model into a stable and reliable one.
To understand how King Mode works, you first need to understand the technical mechanism of system prompts. A System Prompt is the highest-priority instruction layer in an LLM's inference pipeline, injected before the conversation begins, exerting continuous constraints on the model's entire response process. From a technical mechanism standpoint, the system prompt occupies high-weight positions in the attention mechanism, influencing the probability distribution at every token generation step. The core principle behind behavioral constraint prompts like King Mode is: explicitly telling the model through meta-instructions which output patterns are prohibited, thereby suppressing redundant generation paths during the decoding phase. This differs from behavioral shaping during RLHF (Reinforcement Learning from Human Feedback) training—prompt engineering is inference-time intervention that requires no model retraining, is extremely low-cost, yet delivers immediate results. This also explains why the same model can exhibit drastically different "personalities" under different system prompts.
Related articles
TutorialsChatGPT Plus Subscription Guide: Are GPT-5.5, image-2, and Codex Worth the Upgrade?
A detailed look at ChatGPT Plus features — GPT-5.5, image-2, and Codex — with a Plus vs Pro comparison and a complete step-by-step subscription guide for users outside the US.
TutorialsHarness AI Engineering in Practice: Using Claude Code to Master Enterprise-Level E-Commerce Development
Deep dive into Harness AI Engineering: master enterprise e-commerce development with Claude Code using the Rules, Skills, Wiki, and Changes framework.
TutorialsCursor + Codex Dual-IDE Collaboration: A Practical Methodology for Open-Source Project Customization
A complete methodology for open-source project customization based on real-world experience, detailing the Cursor+Codex dual-IDE workflow, seven-stage process, MVP validation, and AI source code reading techniques.