Replacing a local coding model can look like a one-line configuration change. The risk is that a new model changes small behaviors your tools rely on: whether it returns valid JSON, follows a diff-only instruction, handles an unfamiliar file, or declines to invent a missing API. A model name that sounds newer is not evidence that your workflow improved.
Treat the upgrade as a compatibility change. Keep the current model available, define a small task set from real work, and compare the candidate against the same inputs and success rules. Ollama’s /api/show endpoint exposes model details such as its template and capabilities; /api/tags lists local models and their digests. A tag can move, while a recorded digest identifies the artifact you evaluated. See the Show Model Details reference and List Models reference.
Prerequisites and a ten-task set
You need Node.js, Ollama already configured with two candidate models, and ten small tasks that represent your actual workflow. No new model download is required for this exercise. Keep tasks free of secrets and private repository content. A useful starter set: explain a function, write a focused unit test, repair a visible bug, add input validation, refactor without behavior changes, summarize a diff, produce a requested JSON object, follow a diff-only format, identify a missing requirement, and refuse to guess when a symbol is absent.
For each task, write the input once and define a pass condition before you run either model. Some conditions are automatic: parses as JSON, patch applies cleanly, or output contains no prose outside a requested format. Others need a reviewer: tests capture the bug, the explanation is grounded in the provided code, or the model flags ambiguity rather than fabricating a function. Do not reduce every task to string equality; equivalent correct code may differ in formatting.
Save outputs by task ID with the configuration. Keep prompts, tools, context limits, and generation settings fixed when isolating model changes. Record prompt or template changes as separate configurations.
Use a small scorecard
For every task, record pass/fail, the reason, and whether review was manual. Add response time if it matters to your workflow, but do not rank on speed alone. A faster model that fails structured output or edits unrelated files may cost more time downstream. Conversely, a small latency regression may be acceptable if the candidate reliably handles an important task better.
One compact table works well:
| Task | Pass rule | Current | Candidate | Notes |
|---|---|---|---|---|
| JSON output | Parses and matches required keys | Pass/fail | Pass/fail | No extra text? |
| Bug repair | Test catches defect; patch passes | Pass/fail | Pass/fail | Review diff |
| Unknown symbol | Asks or states uncertainty | Pass/fail | Pass/fail | No invented API |
Fill the remaining rows with your ten tasks. If repeated runs change a pass into a failure, record that variation alongside the configuration. An upgrade needs to preserve the behavior your caller relies on, including formatting and tool arguments.
Here is a dependency-free scorer for the decision rule. The ten records below are synthetic fixtures to exercise the acceptance logic; they are not outputs from any model. Save as score-fixture.mjs and run node score-fixture.mjs:
import assert from 'node:assert/strict';
const results = [
{ id: 'explain', pass: true, hardStop: false },
{ id: 'unit-test', pass: true, hardStop: false },
{ id: 'bug-fix', pass: true, hardStop: false },
{ id: 'validation', pass: true, hardStop: false },
{ id: 'refactor', pass: true, hardStop: false },
{ id: 'diff-summary', pass: true, hardStop: false },
{ id: 'json', pass: true, hardStop: false },
{ id: 'diff-only', pass: true, hardStop: false },
{ id: 'missing-requirement', pass: true, hardStop: false },
{ id: 'unknown-symbol', pass: false, hardStop: true },
];
assert.equal(results.length, 10, 'suite must contain ten tasks');
const passed = results.filter((result) => result.pass).length;
const hardStop = results.some((result) => result.hardStop);
const accepted = passed >= 8 && !hardStop;
assert.equal(passed, 9);
assert.equal(accepted, false, 'a hard-stop regression blocks adoption');
console.log({ passed, total: results.length, hardStop, accepted });
The unknown-symbol failure blocks adoption despite nine passing tasks. Replace the fixture values with reviewed results from your ten tasks, keeping the acceptance rules fixed throughout the comparison.
Pin the configuration you accepted
Keep a simple model configuration containing the tag and the digest observed for the artifact you reviewed. Also record the Ollama version, system prompt revision, and relevant generation options. Use /api/show to inspect model metadata when investigating a change in template or capability. The model details endpoint should not be assumed to provide a digest field; use the model listing for its digest. Keep the old model available until the candidate has passed the tasks in the environment where it will run.
Templates, quantization, context windows, and tool behavior can change results too. Change one variable at a time when practical, and preserve the previous configuration for rollback.
A concrete acceptance decision
Before testing, define hard stops: fabricated APIs, malformed required JSON, or an unrequested destructive edit may block adoption regardless of pass count. Have a reviewer explain meaningful quality differences. If the models trade wins and losses, decide which workflow cost matters more.
This prevents easy passes from averaging away a severe regression. Ten tasks cannot represent every request; their value is repeatability. The next candidate faces the same known cases, and reviewers can see what changed.
Add regression cases as the workflow changes
A curated suite can become stale. Include formatting constraints, edge cases, and an explicit “not enough information” task. Manual review costs attention, while automatic scoring can reward wording or miss a harmful edit.
When an upgrade breaks a caller, save the smallest input that reproduces the failure and add it to the next comparison. Keep the previous configuration ready for rollback while investigating. Over time, the suite becomes a record of the JSON shapes, patch formats, and tool behavior that your coding workflow actually depends on.
Top comments (0)