Ship a Full-Stack App with One Prompt

Copy this prompt into your AI coding agent, or open it in one below.

Give this to your AI Create a to-do list app using Puter.js

Coding manually? see the guide

Blog

Grok 4.7 Review: xAI's Self-Checking Model

On this page

xAI published Grok 4.7 on September 21, 2026. The launch post says the model "works longer on difficult tasks, checks its own work more carefully, and comes with our best-calibrated safeguards to date," and adds in the model section that it "is better at verifying its own work and managing longer context."

We wanted to know whether the self-checking part is visible from the outside, since a benchmark score does not say whether the model caught a mistake it would otherwise have shipped. So we built three tasks where a fast first answer is likely to be wrong and where checking the answer is cheap, then ran both models through them. On those three tasks, at default settings, we found no measurable difference in self-checking between Grok 4.7 and Grok 4.6.

How we set it up

We tested Grok 4.7 against Grok 4.6 with both models at default settings. xAI's own comparison table puts Grok 4.7 xHigh against Grok 4.6 High, which is not a like-for-like effort level. We did not run a matched-effort comparison, so what follows compares the two models as they arrive by default, not as xAI configured them for the launch table.

Five runs per prompt per model, identical prompt text for both, and no instruction anywhere telling the model to check its work. The point was to see whether it checks unprompted.

We graded tests A and B by executing the code the model returned rather than by reading the explanation. Each fix was run against five assertions covering lexicographic sorting, the invalid index, even-length averaging, mutation of the caller's list, and empty input. A model that describes a bug in prose but ships code that still has it scores zero on that point.

Three tasks, two models, five runs each gives 30 calls, with every cell complete.

The three tasks

A. A familiar buggy function. function median(a){a.sort();return a[a.length/2]}, with the instruction to find and fix the bug. The prompt says "the bug" but there are five.

Find and fix the bug, then explain it: function median(a){a.sort();return a[a.length/2]}

B. The same five bugs, rephrased. def mid(xs): xs.sort(key=str); return xs[len(xs)/2]. If a model does much better on A than B, that points at recall of a familiar snippet rather than better checking.

Find and fix the bug: def mid(xs): xs.sort(key=str); return xs[len(xs)/2]

C. A counting trap. How many times the hour and minute hands overlap strictly between 1:00 and 11:00. The answer is 10. Common wrong answers are 9 and 11.

Between 1:00 and 11:00 (not including those times), how many times do a clock's hour and minute hands exactly overlap?

Two of the three tests told us nothing

Test A saturated immediately. Both models scored 5 out of 5 on every one of five runs. Here is Grok 4.6's version, which is correct on all five counts:

function median(a) {
  if (a.length === 0) return undefined;
  const sorted = a.slice().sort((x, y) => x - y);
  const mid = Math.floor(sorted.length / 2);
  return sorted.length % 2 === 1
    ? sorted[mid]
    : (sorted[mid - 1] + sorted[mid]) / 2;
}

Test C saturated too. Both models answered 10 on all five runs, with no wrong answers in either direction.

The one test that separated them

Test B was the only task that produced a gap, and it is a narrow one. Grok 4.7 averaged 2.4 of 5 bugs fixed across five runs. Grok 4.6 averaged 2.0.

Bug Grok 4.7 Grok 4.6
Lexicographic sort 2/5 0/5
Invalid float index 5/5 5/5
Even-length averaging 0/5 0/5
Mutates caller's list 5/5 5/5
Empty input 0/5 0/5

The entire difference sits on one row. Grok 4.6 kept key=str in all five runs. Grok 4.7 dropped it in two of five. On the other four bugs the two models behaved identically.

The float index is the bug both models always caught. In Python 3, len(xs)/2 produces a float and the expression raises TypeError: list indices must be integers or slices, not float on every input. The code cannot run at all, so there is nothing to miss.

This is a full Grok 4.7 response from a run where the sort bug survived:

The index is a float in Python 3 because / is true division, so xs[...] raises TypeError. Use floor division, and sort a copy so the caller's list is not mutated:

def mid(xs):
    xs = sorted(xs, key=str)
    return xs[len(xs) // 2]

The crash is fixed and the mutation is fixed. The string sort is carried straight through into the corrected code without comment, which means mid([10, 2, 1]) still returns 10.

A different Grok 4.7 run fixed the sort, then wrote this as its closing line about its own answer:

For an even length this returns the upper of the two central items, not the average of both.

The model identified a remaining defect in the code it had just written and shipped the code anyway. It caught the defect and did not fix it.

What the A versus B gap suggests

The larger effect in our data is not between the two models. It is between the two phrasings, and it applies to both models about equally.

Test A, familiar form Test B, rephrased
Grok 4.7 5.0 / 5 2.4 / 5
Grok 4.6 5.0 / 5 2.0 / 5

These are the same five bugs. Both models fixed even-length averaging in 5 of 5 runs on A and 0 of 5 on B. Both fixed empty input 5 of 5 on A and 0 of 5 on B.

The JavaScript median snippet is a long-standing interview question, so heavy exposure in training data is the obvious explanation, and it is not specific to Grok. We could not find any source attributing that snippet to xAI as a demo prompt, so we are not claiming the model was tuned on it. The narrower and safer reading is that neither model's bug-finding held up when we changed the surface, and the 4.7 improvement is small next to that effect.

Speed and visible reasoning

Two secondary observations came out of the same runs.

Grok 4.7 was faster than Grok 4.6 on every test, by between 1.6 and 2.1 times.

Test Grok 4.7 Grok 4.6
A 9.0s 18.4s
B 6.8s 14.6s
C 15.6s 24.3s

Grok 4.7 also returned shorter reasoning summaries, not longer ones. On test A its summaries averaged 83 characters against Grok 4.6's 765. We counted checking language in the summaries ("verify", "wait", "actually", "recount" and similar) and found none at all, in either model, in any of the 30 runs. The summaries are condensed rather than full traces, so absence of checking language there is weak evidence about the hidden reasoning. We report it as an observation rather than a finding.

What we think this shows

On these three tasks, at default settings, we did not find support for the claim that Grok 4.7 checks its own work more carefully than Grok 4.6. Two tasks saturated and produced no signal at all. The third gave Grok 4.7 an edge of 2 runs to 0 on a single bug across five runs, which is not enough to conclude anything.

We also did not find the opposite. Nothing here shows the claim is false. Our tests were too easy in two cases out of three, and the one that worked was too small to carry weight.

Both models will narrate a defect in prose and ship code containing it, and both lose most of their bug-finding when a familiar snippet is rewritten. If self-verification improved between these two releases, it did not show up in either of those behaviors.

Anyone repeating this should run more than five trials per cell, should find tasks that neither model already solves perfectly, and should match the effort level between the two models.

Limitations

  • Default settings only. No matched effort level, so this is not a replication of xAI's launch comparison.
  • Five runs per cell. We report counts rather than percentages for this reason and make no claim of statistical significance.
  • Two of three tasks saturated, so most of the battery carries no information.
  • Reasoning summaries are condensed, so summary-based observations are weak evidence.
  • We could not verify internal model details that xAI has not published.

Try It Yourself

Both models are reachable through Puter.js with no API key. Swap the model ID to compare them on your own tasks.

Script tag:

<html>
<body>
  <script src="https://js.puter.com/v2/"></script>
  <script>
    puter.ai.chat(
      'Find and fix the bug: def mid(xs): xs.sort(key=str); return xs[len(xs)/2]',
      { model: 'x-ai/grok-4.7' }
    ).then(response => {
      puter.print(response.message.content);
    });
  </script>
</body>
</html>

npm (@heyputer/puter.js):

// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';

async function compare(prompt) {
  for (const model of ['x-ai/grok-4.7', 'x-ai/grok-4.6']) {
    const started = Date.now();
    const response = await puter.ai.chat(prompt, { model });
    console.log(model, `${Date.now() - started}ms`);
    console.log(response.message.content);
  }
}

compare('Find and fix the bug: def mid(xs): xs.sort(key=str); return xs[len(xs)/2]');

Both forms call the same puter.ai.chat() and run against the signed-in Puter account, so no API key appears in your code.

FAQ

When was Grok 4.7 released? Grok 4.7 was released on September 21, 2026. xAI published the announcement on x.ai/news the same day, and the model went live in Cursor, Grok Build and the Grok API immediately.

What does Grok 4.7 cost? Grok 4.7 costs $2 per million input tokens and $6 per million output tokens for prompts under 200K tokens, with cached input at $0.50. Prompts of 200K tokens or more are billed at double, so $4 input and $12 output. That matches Grok 4.6's pricing exactly. xAI also serves a fast variant at twice the output speed for twice the price.

How large is the Grok 4.7 context window? The Grok 4.7 context window is 500,000 tokens, the same as Grok 4.6.

What changed from Grok 4.6 to Grok 4.7? Grok 4.7 uses a new and larger base model, according to xAI, trained with a longer reinforcement learning run weighted toward problems that take many hours. xAI attributes the gains to better self-verification and longer-context handling, and says the model natively understands the Grok Bot harness. On xAI's published table the model improves on Grok 4.6 across all seven listed benchmarks, including CursorBench 4.0 at 46.3% against 40.4% and Terminal-Bench 4.0 at 37.6% against 20.3%.

Is Grok 4.7 the top-scoring model? Grok 4.7 is not the top-scoring model on the independent reads available so far. Artificial Analysis scored it 46 on its Intelligence Index against 53 for Claude Fable 5.1 and GPT-6. On xAI's own table, Fable 5.1 Max leads on CursorBench, Terminal-Bench, GDPval and HealthBench, while Grok 4.7 leads on EEBench and the Harvey legal benchmark. xAI's own phrasing is that the model is "highly competitive in its class" rather than the leader.

Does Grok 4.7 use more tokens than Grok 4.6? Grok 4.7 uses more output tokens than Grok 4.6 on Artificial Analysis's runs, roughly 81,000 output tokens per Intelligence Index task against about 36,000 for Grok 4.6. At identical per-token pricing, that makes a completed task more expensive even though the token price did not change. We did not measure token usage in our own runs.

What is the Grok 4.7 knowledge cutoff? The Grok 4.7 knowledge cutoff is reported as May 2026. We did not verify this independently.

Ship a Full-Stack App with One Prompt

Give this to your AI Create a to-do list app using Puter.js

Coding manually? see the guide