Repository navigation
Prompt building Tier 0 — echo-don't-compute improvements (tracking) #29
Description
Prompt building Tier 0 — echo-don't-compute improvements (tracking)
Tier 0 of the prompt-building improvement ladder: everything here is prompt copy + pure deterministic modules — zero new data dependencies, zero extra inference round trips, no validator-invariant changes, no schema changes. Later tiers (deterministic APR-per-tier modeling; multi-pair candidates from held tokens; fine-tune follow-up prompts) build on these.
The constraint that shapes all of it
The composer model is qwen/qwen2.5-omni-7b — a 7B model with MAX_COMPOSE_ATTEMPTS = 2 and a user watching a spinner (latency is user-facing, F2 Q3). It has already been caught fabricating chainIds and deadlines until the prompt said "copy these EXACTLY" (compose.ts). So the tier's principle: deterministic code computes (classification, arithmetic, rankings, corrective values); the model picks from menus and echoes. Every issue below is that principle applied to one seam.
Issues
- Prompt T0.1 — deterministic risk-appetite classifier, rendered as one prompt line #24 — T0.1: deterministic risk-appetite classifier, rendered as one prompt line
- Prompt T0.2 — precompute pairing arithmetic in the prompt; the model echoes amounts, never derives them #25 — T0.2: precompute pairing arithmetic in the prompt; the model echoes amounts
- Prompt T0.3 — three risk-tiered strategies on one pair, band width as the risk axis #26 — T0.3: three risk-tiered strategies on one pair, band width as the risk axis (depends on Prompt T0.1 — deterministic risk-appetite classifier, rendered as one prompt line #24, Prompt T0.2 — precompute pairing arithmetic in the prompt; the model echoes amounts, never derives them #25)
- Prompt T0.4 — rejection feedback that states the fix, not just the rule #27 — T0.4: rejection feedback that states the fix, not just the rule (independent)
- Prompt T0.5 (spike) — baseline-example anchoring: measure compliance gain vs parroting #28 — T0.5 (spike): baseline-example anchoring, measure compliance vs parroting (after the prompt-refactor PR)
Suggested order: #27 first (fully independent, validator-side), #24/#25 in parallel (pure modules), then #26 (composes them), #28 last.
Coordination
A PR refactoring prompt building is in flight. All pure modules (appetite, pairing math, band tiers, validator messages) are safe to build immediately; the prompt-rendering integration in each issue targets whichever builder that PR leaves standing (packages/arbitration-sdk/src/compose.ts vs the F2 §9 six-section contract in packages/app/src/lib/compose/prompt.ts). Bump PROMPT_VERSION on any prompt-contract change, per F2 §9.
Per repo rule (CLAUDE.md): decisions made while building — the appetite lexicon, the band-tier rubric, the T0.5 go/no-go — go back to the Notion feature pages (F2 §9, F3 band logic), not only into the PRs.
References
- Notion F2 (prompt contract, gates): https://app.notion.com/p/3a8caae5863181609acbcfd69a5db06b
- Notion F3 (market context, vol/band): https://app.notion.com/p/3a8caae58631812cadd9df083e8d0dd9
Activity
GustavoSena commentedon Jul 25, 2026
Coordination update after reviewing #30 (the prompt-refactor/server-compose PR):
packages/app/src/lib/compose/prompt.ts,grammar.ts,templates.ts). The SDK'sbuildComposeMessages(packages/arbitration-sdk/src/compose.ts) is the one surviving prompt builder — every integration note in Prompt T0.1 — deterministic risk-appetite classifier, rendered as one prompt line #24–Prompt T0.5 (spike) — baseline-example anchoring: measure compliance gain vs parroting #28 now points there.messagesin the API response, which is precisely the observability the spike needs.maxStrategies: 3as server policy.PROMPT_VERSION(the files its comment references are deleted, and the surviving SDK builder carries no version — F2 §9 requires one in every trace). ReintroducepromptVersioninbuildComposeMessages/ServerComposeResult; until then, the "bump PROMPT_VERSION" notes in Prompt T0.1 — deterministic risk-appetite classifier, rendered as one prompt line #24–Prompt T0.3 — three risk-tiered strategies on one pair, band width as the risk axis #26 and Prompt T0.5 (spike) — baseline-example anchoring: measure compliance gain vs parroting #28 read as "add it, then bump it".GustavoSena commentedon Jul 26, 2026
Tier 0 status:
PROMPT_VERSION→sluice.compose/3)The
PROMPT_VERSIONfollow-up this tracking issue inherited from #30 is closed — it was reintroduced in the SDK builder by #32 and is bumped by #39, so "add it, then bump it" is done.Two things surfaced while building that are worth carrying forward rather than losing in a PR body:
realizedVol7dPctas annualised (the other reading gives ±87%–±99% bands — full-range in all but name). This must be confirmed when F3 Open Q2 lands a real volatility source; the field may want renaming then.virtualAmountsratio is far from mid. That is the Tier 2 invariant (I17 in the original plan) and it is worth its own issue whenever multi-pair work starts.GustavoSena commentedon Jul 26, 2026
Tier 0 is complete except for the measurement.
The
PROMPT_VERSIONfollow-up inherited from #30 is closed: reintroduced by #32, nowsluice.compose/3.Three things Tier 0 surfaced that outlive it, none of which belong to this tracking issue but all of which would otherwise be lost in PR bodies:
ServerComposeResultdoesn't carry the tier — so the screen shows three band percentages with no framing, andfrom-server.tsstill fabricates a risk chip from band presence while the app README says risk ratings are unavailable until Gate 2. Worth one issue covering both.realizedVol7dPctas annualised; confirm when F3 Q2 lands a real source.I'd close this tracking issue once #28 has its numbers.