Let’s talk about grounding. NOT the kind where your kid ignores you after school and suddenly has no phone for a week!

In electrical engineering, grounding means connecting a circuit to earth so it doesn’t drift and pick up noise. So anchoring to something real.

Now… what does grounding mean for an AI model? Without your context, the model samples from everything it was trained on. It might still be right, if your task matches well-known patterns. But it might drift toward whatever looks statistically plausible.

But, by giving it a real context: screenshot, an actual file, real selectors from your codebase aaand you shift the probability distribution. The model is now conditioned on your tokens. The space of likely next outputs narrows toward your reality.

If you’re familiar with chaos theory: small changes in initial conditions cause drastically different outcomes. Adding context is exactly that. A few extra tokens at the start, and the whole output distribution shifts.

Grounding however doesn’t guarantee correctness. If your screenshot is wrong, the model follows it. If your code has a bug, the model reasons on the bug. Grounding means alignment to what you gave it, but not to some external truth.

This is also one of the reasons why copying someone’s prompt rarely works for you. Their model was grounded in their context. Yours isn’t. Same prompt, different distribution. (Of course, it also happens because of the temperature, probabilistic things, etc., but this is a different story.)

graph TD
    subgraph with["With grounding"]
        A["Your prompt"] --> C["LLM"]
        B["Files / screenshots / code"] --> C
        C --> D["Output:<br/>constrained to your inputs<br/>(probabilities concentrated<br/>on relevant tokens)"]
    end

    subgraph without["Without grounding"]
        E["Your prompt"] --> F["LLM"]
        F --> G["Output:<br/>broad / unconstrained<br/>distribution (many<br/>plausible continuations)"]
    end

    classDef prompt fill:#dee3c6,stroke:#758879,stroke-width:1.5px,color:#2d2d30
    classDef context fill:#7c838e,stroke:#5a6f8f,stroke-width:1.5px,color:#f5f5f0
    classDef llm fill:#ddc6e3,stroke:#7e7a8b,stroke-width:1.5px,color:#2d2d30
    classDef goodOut fill:#c5e0cb,stroke:#758879,stroke-width:1.5px,color:#2d2d30
    classDef broadOut fill:#e3d7c6,stroke:#8b7e7a,stroke-width:1.5px,stroke-dasharray:4 3,color:#2d2d30

    class A,E prompt
    class B context
    class C,F llm
    class D goodOut
    class G broadOut

    style with fill:none,stroke:#758879,stroke-width:1px
    style without fill:none,stroke:#aab6c6,stroke-width:1px,stroke-dasharray:5 3
how-llm-works mcp context-window