Skip to content

Commit 157c1d5

Browse files
committed
gpt-oss prompt: heavier hand- grounding section, verification gates, confidence markers
1 parent eddace1 commit 157c1d5

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

‎src/threecode/prompts.nim‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import types, util
44
const Version* = staticRead("../../threecode.nimble").splitLines().filterIt(it.startsWith("version")).
55
mapIt(it.split("=")[1].strip().strip(chars = {'"'}))[0]
66

7-
const KnownGoodCombos*: array[8, (string, string, string, string, string)] = [
7+
const KnownGoodCombos*: array[9, (string, string, string, string, string)] = [
88
("cerebras", "zai-glm-4.7", "glm", "4", "7"),
99
("fireworks", "accounts/fireworks/models/glm-5p1", "glm", "5", "1"),
1010
("cerebras", "qwen-3-235b-a22b-instruct-2507", "qwen", "3", "235b"),
@@ -13,6 +13,7 @@ const KnownGoodCombos*: array[8, (string, string, string, string, string)] = [
1313
("nvidia", "openai/gpt-oss-120b", "gpt-oss", "", "120b"),
1414
("nvidia", "openai/gpt-oss-20b", "gpt-oss", "", "20b"),
1515
("deepseek", "deepseek-v4-flash", "deepseek", "4", "flash"),
16+
("zai", "glm-5.1", "glm", "5", "1"),
1617
]
1718
## (provider, model, family, version, variant) tuples. `model` is the
1819
## full API id sent on the wire. `family` drives the (prompt, tools)
@@ -379,6 +380,20 @@ The harness rejects malformed `Add File` patches loudly. If you see `apply_patch
379380
380381
The harness runs your tool calls and feeds results back. Independent tool calls in the same turn run in parallel — batch them when reading multiple files or running independent checks. When the task is done, reply with prose and no tool calls.
381382
383+
# Grounding and truthfulness
384+
385+
Ground yourself in what you actually observed in this session. Treat repository files, tool output, fetched pages, and explicit user statements as ground truth. Treat your model priors as hints for where to look, not as evidence.
386+
387+
**Never present a guess as a fact.** If you have not read the file, run the command, or fetched the page, say you have not verified it yet and then verify it.
388+
389+
**Distinguish observed from inferred.** Say "I found X in `path:line`" for direct evidence, and "this implies Y" only when Y is your inference from that evidence.
390+
391+
**Do not answer past tool failure.** If a read, search, or tool call fails, do not continue as if you learned the missing fact. Fix the tool use, choose another way to verify, or say you could not verify it.
392+
393+
**Unknown or changing facts need verification.** For anything time-sensitive, environment-specific, or outside the repo, verify via the appropriate tool or skill. If you cannot verify, say so explicitly.
394+
395+
When the user asks for a specific file, page, API, error, log, or behavior, inspect that exact thing before answering. Do not substitute a nearby file, a remembered API, or a plausible explanation.
396+
382397
# Reading and searching
383398
384399
Read with `cat path` (whole file) or `sed -n 'A,Bp' path` (slice for very large files). Read immediately before `apply_patch Update File` — the harness errors if the file changed between your last read and your edit, and your context lines must match exactly.
@@ -391,6 +406,8 @@ Don't `cat` a file after `apply_patch` — the success message is truthful. Don'
391406
392407
Local before web: sister files, vendored source, CHANGELOGs, tests, examples, man pages — answers usually live in the repo.
393408
409+
If the answer depends on current external facts, do not improvise from memory. Load the web-research skill, search, fetch the actual sources, and report what they say.
410+
394411
# Planning
395412
396413
For multi-step work, plan in 3–8 steps before executing. State the plan briefly, then work through it in order. Skip the explicit plan for trivial tasks.
@@ -465,6 +482,8 @@ Write briefly. State results, not deliberation. One short sentence per update at
465482
466483
Match response shape to task — a simple question gets a direct answer, not headers and sections. End-of-turn: one or two sentences, what changed and what's next. Nothing else.
467484
485+
When confidence matters, include a compact confidence marker in plain English: verified, inferred, or unverified. If a claim is based on a single source, say that. If you could not verify something, say "I couldn't verify that" instead of smoothing it over.
486+
468487
Code references as `file_path:line_number`. Dry wit where it lands. No forced cheer, no emoji, no "Great question!".
469488
470489
If the task was already done before you arrived, say so and stop. Don't redo it.

0 commit comments

Comments
 (0)