OverpayingForAIPricing desk

Lesson 5 of 8 · 9 min read · Beginner → Intermediate

Prompting basics for Grok

A prompt is instructions plus context plus a target format. Three before-and-after examples show how to get better Grok answers without more tokens.

In this lesson you will

  • Structure a prompt as role, task, context, constraints, and format
  • Control whether Grok uses live X data
  • Rewrite a vague prompt into one that gets a usable first answer

Grok answers the question you asked, not the one you meant. Most disappointing outputs come from prompts that leave out the audience, the format, or the constraint that mattered. Better prompts usually cost nothing extra and often cost less, because the first answer is the one you keep.

Anatomy of a prompt that works first timeFive parts. Most bad answers are missing two of them.RoleWho the model should be
“You are a pricing analyst…”
TaskThe one thing you want
“Rank these 4 plans by cost per 1K tokens.”
ContextFacts it cannot guess
paste the plan table, your usage
FormatShape of the answer
“a table, then a 2-line verdict”
ConstraintsWhat to avoid
“no marketing language; cite the source”
Cost angleA precise prompt costs a few hundred tokens more and saves the two or three retries that cost thousands.Asking for a short format (“3 bullets”) cuts output tokens — the expensive kind — by half or more.
Figure 1.The five parts of a working prompt: who the model is acting as, what to do, the material to work from, the limits, and the shape of the answer. Missing any one of these is the usual cause of a wasted turn.

Grok-specific habits

  • Say whether to search X. Grok may pull in live posts unless you tell it not to. For analysis, add "Do not search X; answer from what I give you."
  • Give it the material. With context windows in the hundreds of thousands of tokens on the API, you can paste the whole document. On the free allowance keep pastes tight so you do not burn the limit.
  • Ask for the format you will paste somewhere. Bullets, a table, JSON, a subject line. Grok follows format instructions well when they are explicit.
  • Tone control. Grok's default voice can be casual or jokey. If you want plain business prose, say so in one line.

Worked example 1: summarising a thread

Before: "Summarise this thread." You get a paragraph in whatever tone Grok feels like, sometimes with commentary you did not ask for.

After: "You are a neutral analyst. Summarise the thread below in five bullets for a manager who has not read it. Do not search X or add outside information. Neutral tone, no jokes. End with one sentence on what action, if any, is needed. Thread: [paste]"

Worked example 2: drafting a reply

Before: "Write a reply to this customer." Grok invents details about your product and your refund policy.

After: "Draft a reply to the customer message below. Facts you may use: order shipped 2 September, refunds take 5 business days, we cannot expedite. Do not promise anything not listed. Under 120 words, polite, no emojis, sign off as Support Team. Message: [paste]"

Worked example 3: extracting data

Before: "What are the key numbers in this report?" You get a narrative that mixes figures with opinion.

After: "From the report below, return a JSON array. Each item has fields: metric, value, period, page. Only include numbers that appear verbatim in the text. If a field is unknown, use null. Return JSON only, no prose. Report: [paste]"

When a prompt keeps failing

If three careful attempts on Grok 4 Fast are still wrong, the fix is usually not more words. Try the same prompt on Grok 4.3 or Grok 4.20 and compare. If the mid-tier model gets it right, you have found a task that justifies the higher price. If it also fails, the task probably needs to be split into smaller steps.

Knowledge check

Which instruction stops Grok pulling in live X posts when you want an answer based only on the text you pasted?

Lesson FAQ

Does Grok support system prompts?

On the API, yes: the OpenAI-compatible chat endpoint accepts a system message. In the consumer app, put your standing instructions at the top of the conversation instead.

Should I ask Grok to think step by step?

For maths and logic it can help. For summaries and drafts it mostly adds tokens. Try both on your own task and keep whichever gives the better first answer.

Finished reading?

Mark it done to track your progress through the course.

Compare, calculate, decide — for Grok

If our calculators helped you cut down on hidden AI wallet leaks, consider buying us a coffee. A tiny fraction of your savings keeps our pricing indexes updated daily.

Not sure which AI is cheapest for your use case? Find out in 30 seconds — no signup required.

AI cost intelligence

Stop overpaying for AI tools

Join the OverpayingForAI list for pricing updates, cheaper alternatives, and practical buying guidance.

Now tracking 50+ AI tools, models, platforms, subscriptions, coding tools, and automation products.

We use your email only for OverpayingForAI updates. Unsubscribe anytime.