feat(describe): structured output for the skip decision (T-081, keystone)#145
Open
Ztein wants to merge 3 commits into
Open
feat(describe): structured output for the skip decision (T-081, keystone)#145Ztein wants to merge 3 commits into
Ztein wants to merge 3 commits into
Conversation
…ll (Phase 0, T-082) Adds api.temperature (default 0.0) and passes it to all five completion call sites (describe, diagram, OCR, and both summarize calls). Reproducibility is the prerequisite for the quality track: without it, the same document gives different output each run, so "did this change help?" is unanswerable. Also carries Joel's config.example.yaml prompt refinement (item 2: describe each series' development, ideally with concrete numbers) — an unrelated one-liner that was in the working tree; kept so it isn't lost. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…+ merge Phase 0 The significance decision now comes from a validated FigureResult.is_figure boolean (response_format=json_schema), not a fragile "[SKIP]" string the model must format exactly. Graceful fallback to the legacy text prompt on an endpoint without json_schema support (air-gap-safe). describe_image preserves the empty/ truncation/cache/retry behaviour; the [SKIP] instruction is dropped from the structured prompt (the schema carries it) and kept in the fallback prompt. Merges Phase 0 (api.temperature) which this builds on — call_vision passes temperature to every model call. Tests: 3 new (skip via is_figure, description, fallback); full offline suite green. Remaining: wire the diagram path (diagrams.py) through call_vision too. Co-Authored-By: Claude Opus 4.8 <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.
T-081 keystone — the skip/keep decision now comes from a validated `FigureResult.is_figure` boolean via `response_format=json_schema`, not the fragile `[SKIP]` string a model can fail to emit (the junk-leak that blocked T-080).
Builds on Phase 0 (`api.temperature`) — this branch merges it, so the diff includes #143's changes until that merges.
Remaining in T-081: wire the diagram path (`diagrams.py`) through `call_vision` too, so over-captured vector regions also skip cleanly. Then T-080 (one-box-per-page extraction) is unblocked.
Core-path change — opened for review, not admin-merged.
🤖 Generated with Claude Code