Repository navigation
docs: ContextScorer cost model and go/no-go (phase 4) - #30
Merged
Merged
Conversation
Compare per-chunk Jev scoring plus re-prefill against forfeited prefix-cache reuse, using recorded Jev latency (132 receipts), arena token usage, and official TypeSafe, OpenAI and Anthropic pricing. Decision: no-go for ContextScorer integration code; conditional go for a shadow experiment on synthetic context only. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The model incorrectly treats request count as a fixed overhead ratio and does not fully check Jev’s state-plus-question token limit.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
Adds the phase 4 ContextScorer cost model and records a no-go for integration code, while keeping a synthetic shadow experiment conditional.
Changes:
- Adds pricing, latency, cache, break-even, egress, and experiment guidance.
- Links the decision from architecture documentation.
- Marks the cost-model roadmap item complete; no runtime or verdict changes.
| File | Description |
|---|---|
docs/context-scoring-cost-model.md |
New ContextScorer cost model and decision record |
docs/architecture.md |
Links the cost model and decision |
docs/roadmap.md |
Updates phase 4 progress |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+259
to
+260
| 5. **The request fits Jev's limits.** `K` plus the longest question fits in | ||
| 32k tokens per request (TS), or the scorer splits requests and pays the |
|
|
||
| ### Break-even drop fraction `d*` | ||
|
|
||
| With `ε = 0.1`, meaning one fan-out request per turn: |
This was referenced Sep 23, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


What changed
Adds
docs/context-scoring-cost-model.md, the phase 4 cost model for per-chunk context scoring, and links it fromdocs/architecture.md(host seams / ContextScorer) and roadmap phase 4. It ticks only "Compare scoring/re-prefill costs with forfeited prefix-cache reuse". The egress review, shadow experiment and integration decision items stay open. No ContextScorer code is added.Decision: no-go for ContextScorer integration code; conditional go for a shadow experiment on synthetic context only.
s'=0and the scored block placed last):d* = s·(1 − r) + ρ·(1 + ε). Herer = 0.1is the cache-read multiplier (OpenAI and Anthropic docs) andρ = p_J/Pis Jev's price relative to the proposer's: $0.042/Mtok against $1.75/Mtok for gpt-5.3-codex, so ρ = 0.024.Every number cites a recorded artifact at a commit SHA (playground
2c6cac9, this repo3b1704f) or an official doc URL checked 2026-09-22. Unknowns stay explicit parameters: context stabilitys, drop fractiond, chunk shape, turns per session, prefill time per tokenτ, the proposer model the arena used, Jev latency at 10–32k-token states, and scorer recall. The doc specifies the shadow experiment that would measure them.Closes #3
Verdict impact
None. No decision-table row, question, fixture, threshold or model pin changes.
Verification
pnpm typecheck(exit 0)pnpm test(exit 0; 84 pass, 0 fail)🤖 Generated with Claude Code