GitHub - xai-org/grok-prompts: Prompts for our Grok chat assistant and the `@grok` bot on X.
Service

GitHub - xai-org/grok-prompts: Prompts for our Grok chat assistant and the `@grok` bot on X.

xai-org
2025.05.18
ยทGitHubยทby Anonymous
#LLM#Grok#AI#Prompt Engineering#Chatbot

Key Points

  • 1This GitHub repository from xai-org provides public access to the system prompts used for their Grok chat assistant and various product features across X and grok.com.
  • 2It contains a range of prompts for different Grok versions (Grok 3, Grok 4, Grok 4.1), specific functionalities like "Grok Explain," and safety prompts for API models.
  • 3The repository is regularly updated with official prompts and is licensed under the GNU Affero General Public License v3.0, ensuring transparency.

This document details the public repository xai-org/grok-prompts, which serves as a central hub for the system prompts utilized by the Grok chat assistant and associated features across grok.com and X (formerly Twitter). The repository is under continuous updates and is licensed under the GNU Affero General Public License v3.0.

The core methodology presented is the open release and categorization of system prompts that govern the behavior, safety, and functional execution of different Grok model versions and features. These prompts are primarily structured as Jinja2 (.j2) templates or plain text files (.txt), indicating their dynamic application within the AI system.

Specific prompts disclosed include:

  • grok4_system_turn_prompt_v8.j2: The primary system turn prompt for the Grok 4 chat assistant, used both on grok.com and X. This prompt likely defines the core conversational persona, instructions, and constraints for the Grok 4 model during a user interaction turn.
  • grok3_official0330_p1.j2: The system turn prompt for the Grok 3 chat assistant, serving the same role as its Grok 4 counterpart for the previous model version.
  • grok_analyze_button.j2: A specialized prompt designed for the "Grok Explain" feature on X, suggesting a context-specific directive for analytical or explanatory tasks.
  • ask_grok_system_prompt.j2: Employed for the @grok bot on X, this prompt likely defines the operational parameters and interaction style for the bot in a social media context.
  • grok_4_code_rc1_safety_prompt.txt: An injected system prompt prefix for the grok-code-fast-1 model accessible via the xAI API. As a prefix, it imposes initial constraints or guidelines, likely related to code generation safety and ethical considerations.
  • grok_4_mini_system_prompt.txt: An injected system prompt prefix for the grok-4-fast model on the xAI API, serving a similar prefix role, potentially for general model safety or behavioral alignment.
  • grok_4_safety_prompt.txt: An injected system prompt prefix for the grok-4-0709 model on the xAI API, specifically focusing on general safety protocols.
  • grok4p1_non_thinking_no_tool_system_turn_prompt.j2: The system turn prompt for a Grok 4.1 variant that operates without an explicit "thinking process" and without access to external tools. This defines a direct response generation mode.
  • grok4p1_non_thinking_system_turn_prompt.j2: The system turn prompt for a Grok 4.1 variant that operates without an explicit "thinking process" but *with* access to external tools. This implies a mode where the model can integrate tool outputs without overt internal reasoning steps.
  • grok4p1_thinking_system_turn_prompt_v2: The system turn prompt for a Grok 4.1 variant that incorporates an explicit "thinking process" but without access to external tools. This indicates a mode where the model is prompted to articulate or engage in internal reasoning before generating a final response.

The repository implicitly demonstrates a prompt engineering strategy that differentiates models by version (Grok 3, Grok 4, Grok 4.1), specific task/feature (Explain, X bot), operational mode (thinking vs. non-thinking), and tool integration capabilities (with tool vs. no tool), alongside the consistent application of safety prefixes across API models.