Repository navigation
docs(guide/06): show a segmented answer, state the cost model, drop the template question - #27
Merged
Merged
Conversation
…he template question Five things a reader asked for, and the restatement they suspected. **The segment vocabulary had no example.** `claim`, `connective` and `quotation` were defined in prose three times over and shown once, never. The chapter now prints a three-segment answer as JSON and annotates each kind. The example is built from `verify.test.ts`'s own fixtures and checked: the quoted span really is a byte-exact substring of the unit, and the claim really cites a locator in context — it would pass the gate as written. The Hungarian is invented, like the fixtures, and says so, because an example using the real wording would be an example that shipped corpus text (ADR-003). **The cost model was never stated.** Two paid calls per novel question — embed, then generate — both after the limiter and after the cache, and exactly ONE round trip to the model, since the segments come back in a single response. Also noted that an open-weights winner turns the embedding into our compute rather than a bill, and is still work an attacker can make us do. **"There is no anonymous LLM endpoint to abuse" read as "so no guard needed".** It removes the abuse of *consuming* output and nothing about the cost of *producing* it, which is why the limiter is load-bearing anyway. That argument was in `architecture.md` only. **The gate table was incomplete and vague.** It omitted `quotation_unknown_locator` entirely, abbreviated two real codes into `…_ratio`, and resolved the proportionality row to "per ADR-017" rather than an outcome. Replaced with the rule the code actually implements, which is sharper than the prose was: **fabrication is fatal, disproportion is repaired.** A span the source never wrote cannot be fixed by deletion; a quotation that is merely too long can be dropped, because the answer's own prose carries the claim. **Two removals for the restatement.** "The context is the whole universe" appeared as a table row, a numbered point and a Check-yourself; the numbered point went, since the question form teaches it better. A paragraph on which language goes where went too — there is a whole section on ADR-014 four headings later. **The template question is replaced.** "Why does the rate limiter fail closed here, when the template's failed open?" cannot be answered by a reader who has never seen the template. Now: "The limiter's backing store is down. Does the next question go through?" Also dropped the State column from the code table — status outside status.md, the same pattern the code map lost in #24. The banner at the top of the chapter already says which parts are built. Chapter 06: 149 prose lines. Diagrams rendered, example JSON parses. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Review of
docs/guide/06-query-path.md. Five reader questions, and the restatement behind them.1. The segment vocabulary had no example
claim,connectiveandquotationwere defined in prose three separate times and shown zero times. The chapter now prints one:{ "language": "hu", "segments": [ { "kind": "claim", "text": "A Katekizmus szerint Isten gondot visel minden teremtményére.", "citations": ["ccc:309"] }, { "kind": "connective", "text": "A kérdés éppen ezért éles:" }, { "kind": "quotation", "locator": "ccc:309", "text": "miért van mégis a rossz?" } ] }Built from
verify.test.ts's own fixtures, and checked rather than eyeballed — the quoted span really is a byte-exact substring of the fixture unit, and the claim really cites a locator in context, so the example would pass the gate as written:The Hungarian is invented and the chapter says so, because an example using the real wording would be an example that shipped corpus text (ADR-003).
2. The cost model, which was nowhere
So: yes, the question is embedded (that's the
Eparticipant in the diagram), and one round trip to the LLM, not two — the segments come back with the answer, not in a second pass. Also noted that an open-weights winner turns the embedding into our own compute rather than a bill, and is still work an attacker can make us do.3. "There is no anonymous LLM endpoint to abuse" read as "so no guard needed"
Both are true at once, and the chapter never reconciled them. Review removes the abuse of consuming model output — nobody can use this as a free proxy, because the caller never sees the text. It does nothing about the cost of producing it. That argument existed only in
architecture.md; it's now on the bullet that raises the question.4. The gate table was incomplete and, in one row, vague
It omitted
quotation_unknown_locatorentirely, abbreviated two real codes into…_ratio, and resolved the proportionality row to "per ADR-017" instead of an outcome.Replaced with what
verify.tsimplements, which is a sharper idea than the prose had:5. The template question
Unanswerable for anyone who has never seen the starter template — and this is the second template reference the review has pulled out of the guide. Replaced with one that stands alone: "The limiter's backing store is down. Does the next question go through?"
On the restatement you suspected — you were right
"The context is the whole universe" appeared three times in one chapter: a table row, a numbered point, and a Check-yourself. The numbered point is gone; the question form teaches it better and the table states the rule. A paragraph about which language goes where also went, because there is a whole section on ADR-014 four headings later.
Net effect: the chapter gained a worked example and a cost model and is still 149 prose lines, down from 153 at its widest.
Also
Dropped the State column from the code table (
✅ built, unwired,📐) — status outsidestatus.md, the same pattern the code map lost in #24. The banner at the top of the chapter already says which parts exist.Verification
npm run docs:lint— clean🤖 Generated with Claude Code