Local AI

A prompt a small model can follow is a contract, not a wish

ZediaLabs · July 2026 · 4 min read

When a 7B model on your laptop mangles a task, the reflex is to blame the model: too small, too quantized, not smart enough. Run the same failure past the checklist below and the diagnosis usually changes. Frontier cloud models fill the gaps in a vague prompt for you. A local model does not. It executes exactly what you wrote, including the parts you left out.

The wish

A wish looks like this: "Summarize these meeting notes." No length, no format, no rule about what to do with action items, no rule about what to do when the notes are ambiguous. A frontier model guesses your intent from context and usually guesses well. A 3B to 13B model picks one interpretation at random per run, drifts mid-output, and invents structure you never asked for. Same prompt, different class of machine.

The contract

A contract states four things, every time, no exceptions:

  1. The task, in one sentence, with one verb.
  2. The constraints: what the output must never contain, what to do with edge cases, when to stop.
  3. The output format, exactly: "three bullet points, each under 20 words, then one line starting with ACTIONS:" beats "a short summary".
  4. The temperature the task needs, because randomness is a per-task setting, not a model setting.
Comparison: a vague one-line prompt produces drifting output from a small model, while a contract stating task, constraints, output format, and temperature produces output that can be verified THE WISH "summarize this" a different answer every run drift · invented structure nothing to check it against THE CONTRACT task · one verb constraints + edge cases exact output format temperature for the task output you can verify against the format
The format line is the quiet hero: output that promised a shape can be checked against that shape by a script, which is what makes agent loops verifiable.
Why the format line matters most: an output with a declared shape can be verified mechanically. That single property is what turns a prompt into a loop step. Plan, act, then check the output against the contract, and a small model becomes reliable through structure instead of size. That is the whole doctrine of the agent loop pattern.

When output is still bad, tune in this order

Cheapest fix first. Change one variable at a time and re-run the same test prompt.

OrderFixWhy here
1. PromptRewrite as a contractMost "model problems" are prompt problems. Free to fix.
2. TemperatureMatch it to the task typeWrong randomness masquerades as stupidity.
3. Context lengthCut input before raising the windowModels forget constraints near the ceiling; bigger context is slower and looser.
4. QuantizationStep up one levelOver-compression costs quality. Q5/Q6 is the 7B to 13B sweet spot.
5. ModelGo biggerThe expensive fix. Only after 1 through 4.

Temperature is a per-task setting

The one-number-for-everything habit comes from chat apps. In a loop, each step declares its own:

TaskTempWhy
Tool calls, commands0.1 to 0.2One right answer. Variance is danger.
Extraction, validation0.1 to 0.3Correctness tasks.
Code0.2 to 0.4Loose enough for idiom, never creative.
Summaries, rewriting0.4 to 0.6Needs phrasing freedom.
Headlines, brainstorming0.7 to 0.9Variance is the product.

Two symptoms cover most cases: a model repeating itself or refusing to continue wants 0.1 to 0.2 more temperature; a model inventing facts or breaking your format wants 0.2 less.

Write the contract once, reuse it forever

None of this is worth doing per prompt, per day. The point of a contract is that it is a file: written once, tested against your model, reused every time the task comes back. A library of tested contracts is the difference between owning a local model and babysitting one.

The free guide below teaches the full pattern: the loop, the stack (LM-Studio, Ollama, oMLX, driven from Pi or OpenCode), and how to write these contracts yourself. As of this week it is a one-click download on Gumroad. If you would rather start from tested parts, the product page also carries the $29 add-on: 56 contract templates across 10 task categories, each with constraints, output format, and temperature already stated, plus a generator that builds custom ones from your tools and limits.

Free · 8 chapters + 4 appendices
Agent Loops with Local AI, the free guide

Make a small model on your own machine finish real jobs. The Plan, Act, Observe, Reflect loop, written for LM-Studio, Ollama, and oMLX. No email required.

Get the free guide →