How to Write Better Prompts for Local AI Models

A local model is not a smaller copy of a frontier chat product. It has a shorter useful context, weaker instruction following, and less patience for ambiguous wording. The fixes below are the ones that change the output on a normal home PC: put the job first, lock the format, keep the task small, write the prompt in plain language, add a check only when the task needs it, and cap the length.

Copy-ready versions of these patterns are in Best Prompt Templates for Local LLMs. The longer test notes are in What Actually Works.

1. Put the instructions before the source text

Many local models weigh the start of the prompt more heavily than the end. If you paste a long article and only then say “summarize this,” the model may continue the article, summarize only the opening, or answer a question that appeared inside the source. State the role, the task, and the rules first. Then paste the text under a clear label such as Text:.

Examples that work

Summarize the text below in 4 bullets. Each bullet is one sentence. Do not add advice. Text: [paste the article here]
You are a Python reviewer. List only bugs. Do not rewrite the file. Code: [paste]
Translate the text below into German. Keep URLs unchanged. No notes after the translation. Text: [paste]

Counterexample

[two thousand words of an article pasted first] Oh and also can you summarize this? Make it good.

Why it fails: the instruction is late, short, and vague. The model has already been “reading” as if the article is the task. “Make it good” does not say what good means. Move a specific summary instruction to the first lines and delete “make it good.”

2. Name the format, not the vibe

Words like “nice,” “professional,” and “insightful” are not a format. A format is a count, a shape, or a ban. Local models follow counts and bans more often than they follow taste.

Examples that work

Answer in exactly 3 bullets. Each bullet is under 20 words. No introduction.
Return JSON with keys title and summary. summary is one sentence. No markdown fence.
Write the function only. Do not explain it afterwards. Do not include tests.

Counterexample

Summarize this in a nice professional way and make the insights really pop.

Why it fails: there is no length, no number of points, and no ban on an introduction. You will often get a heading, a peppy intro, five uneven paragraphs, and a “hope this helps.” Replace it with a count and a sentence limit.

3. Ask for one deliverable

A single prompt that asks for a draft, a translation, a title list, and a social caption is four jobs. On a small model the later jobs get dropped or mixed into the first one. Split them. You can chain them yourself: take the draft, start a new prompt, and ask only for the translation.

Examples that work

Write a 120-word product description. Stop after the description.
Using the description I will paste next, write 5 title options, one per line, under 8 words each.
Reply to this customer email in under 90 words. Do not propose a discount.

Counterexample

Write a blog post about standing desks, translate it to French, make 10 tweets, and design a slide outline. Be creative.

Why it fails: four outputs, no length, and “be creative” fights consistency. The model usually writes a short English post and then loosely gestures at the rest. Run four prompts, or at most two if you have a larger model and you number the outputs.

4. Write the prompt in simpler language than the output

You can ask for a formal memo. The instructions themselves should still be short sentences. Nested clauses, stacked negatives, and jargon in the system prompt are where smaller models lose the thread.

Examples that work

Write a formal memo. Audience: the finance team. Length: 180 words. Include: the cost, the date, and the decision you need. Do not include a history of the project.
Explain DNS to a new office admin. Use short sentences. One example: a browser looking up a site. Stop after the example.
List the steps to reset a password. Number them. Maximum 6 steps. Skip anything about the company brand.

Counterexample

In contradistinction to a conventional chain-of-thought elicitation paradigm, and without presupposing latent tool-use affordances, synthesize a polyvalent yet non-redundant artefact that simultaneously operationalizes clarity, stakeholder resonance, and epistemic humility.

Why it fails: the instruction is harder than the task. The model may echo the jargon or freeze into a vague essay. Say who it is for, how long it is, and what to include.

5. Add a self-check only for brittle tasks

A self-check helps when the output must match a shape: JSON, a fixed number of bullets, or code that should not include prose. It does not help a casual rewrite, and on small models it can make the model print the check instead of the answer. Use one line, at the end.

Examples that work

Return JSON with keys name and date. If a value is missing, use null. Before you answer, check that both keys exist. If not, fix the JSON. Do not describe the check.
Write exactly 5 bullets. If you have written 4 or 6, rewrite once so there are 5. Output only the bullets.
Return only a Python function. If your draft contains an explanation, delete the explanation and return the function again.

Counterexample

Think very carefully, reflect on your reasoning, critique yourself from three philosophical perspectives, then write a birthday note to Sam.

Why it fails: the check is heavier than the task. You wanted a note. You will often get a paragraph about reasoning and a stiff note at the end. For a birthday note, skip the self-check and set a word limit instead.

6. Cap the length in the prompt and in the runner

Local models ramble when neither the prompt nor the app sets a ceiling. Set both. In the prompt, use a word count or a bullet count. In Ollama, LM Studio, or Jan, set a max token limit a bit above that count so the model can finish the last sentence without being cut mid-word. If you are unsure how long the prompt itself is, run it through the Token Counter before you paste a long source document.

Examples that work

Explain the change in 80 to 100 words. Do not add a heading.
Give 4 bullets. Each bullet is one sentence. Stop after bullet 4.
Write a commit message. Subject line under 50 characters. Body: 2 sentences maximum.

Counterexample

Tell me everything you know about backups. Go deep. Don’t hold back.

Why it fails: there is no end. A local model will keep listing generic tips until it hits the runner’s max tokens, often repeating itself. Name the audience and a length: “Give a home PC user 6 backup steps, one sentence each.”

A short before-and-after

This is the same request. The first is how people often type. The second is the version a 7B model can follow.

hey can you look at my notes from the call and make them better and also pull out todos thanks
Clean these call notes. Return two lists only: Decisions and Actions. Actions start with a verb. If no owner is named, write “Owner: not stated.” Do not add tasks that are not in the notes. Notes: [paste]

If you want a second pass, do not ask the same model to “also make it nicer” in the same prompt. Start a new prompt with the cleaned notes and a single new instruction.

What this does not fix

Related guides and tools