Writing & chat · guidance updated 18 Oct 2026

Grok prompt guide

Grok 4.7 (API, Cursor, Grok Build, gateways). 500k context, May 2026 cutoff. Reasoning always on; control depth via reasoning_effort (low/medium/high/xhigh). Encrypted reasoning auto-returned. Grok 4.7 Fast on Cursor/Grok Build (2x cost).

Free. We don't store what you type.

How to prompt Grok

  1. Give concrete material (data, notes, actual text) rather than placeholders; xAI stresses detailed queries.
  2. State specific goal and success criteria up front.
  3. Trigger live data explicitly: 'search X for posts from last 24 hours about...' or 'search web'.
  4. Use low reasoning effort for fast agentic work; medium for complex analysis; high (default) for hard problems; xhigh for maximum quality.
  5. For API users, set prompt_cache_key to route requests to same server and ensure reliable cache hits.
  6. On Responses API, pass encrypted reasoning items back unchanged in next request to maintain reasoning across turns.
  7. Ask for sources or links for any claim from search results.
  8. Structure longer prompts with Markdown headings or XML tags.
  9. Use context compaction for long agent loops to reduce input tokens on repeated calls.
  10. Iterate with short follow-ups rather than rewriting whole prompt.
  11. Specify output format and length; Grok 4.7 produces lengthy output by default.

The shape of a good prompt

## Goal
[what you want and why]
## Context
[facts, pasted data, constraints]
## Live data
[search X / web, time window, sources wanted]
## Reasoning effort
[low/medium/high/xhigh or accept default]
## Output
[format, length, stance wanted?]

Avoid

  • Vague one-liners with no context
  • Expecting current events without requesting search
  • Leaving placeholders instead of real data
  • Asking for balanced overviews when you want a verdict
  • Ignoring encrypted reasoning on multi-turn Responses API calls
  • Requesting presencePenalty, frequencyPenalty, or stop with reasoning models

Example

Request what do people think of the new iphone

## Goal
Give me a snapshot of public reaction to the newest iPhone model.

## Live data
Search X posts from the last 7 days and recent reviews on the web. Cite the posts and articles you rely on.

## Output
- 3 most-praised features and 3 most-common complaints, each with a one-line example quote
- Overall sentiment: positive, mixed or negative, with a one-sentence reason
- Your direct verdict on whether it is worth upgrading from a two-year-old iPhone
Keep it under 250 words.

The Weekly Tally

Useful updates, insights and no-hype advice. Read this week's digest.

One email a week. Unsubscribe in one click.