Skip to content

fix(docscout): batch extraction by estimated reply size - #77

Merged
wolfy-j merged 3 commits into
mainfrom
fix/docscout-reply-batching
Nov 11, 2026
Merged

wolfy-j merged 3 commits into
mainfrom
fix/docscout-reply-batching

Conversation

@wolfy-j

@wolfy-j wolfy-j commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Extraction groups fields by count, so a combined reply can truncate and fail fields whose individual replies fit. Calls now split by a heuristic of each field's expected reply size while retaining the configured field-count cap.

Supersedes #63. Retains the original reply estimator, batching, shape tests and documentation with original authorship. The estimate only schedules batches: an oversized field runs alone, short actual replies succeed, empty passage sets retain their missing outcome, and real truncation follows the existing error path. The weights make no provider or workload accuracy guarantee. Splitting can increase calls, repeated input tokens, cost and latency for existing extractors; each call keeps the configured output allowance. Defaults and stored shapes remain unchanged.

Validation uses runtime v0.3.59a and fresh harness dependencies:

  • Native regressions reproduce combined-reply truncation on unchanged main, then pass on SQLite and PostgreSQL. Additional guards cover oversized estimates with short actual replies, empty retrieval and actual truncation.
  • Browser regression fails on unchanged main and passes with the fix on both engines, asserting both visible values, two singleton requests and stored history.
  • Complete Docscout suites pass 281 tests on each engine; lint checks 170 entries with no issues. No UI or product schema changes require a bundle rebuild.
  • Coverage checks, scenario-map consistency and the issue audit pass in companion guard PR https://github.com/kicksideai/kickside-internal/pull/311.

KickSide added 3 commits November 11, 2026 00:45
Extraction batched fields by count only, so up to 20 fields with values and
quotes shared one max_output_tokens limit; a cut reply failed every field
of the call. Fields now fill a call while their estimated replies (value
leaves, lists at five items, five quotes each, set from measured reply
sizes) fit the output limit, with max_fields_per_call as an upper bound. A
field whose estimated reply alone exceeds the limit fails with
field_output_exceeds_budget, naming the setting to raise.
@wolfy-j
wolfy-j merged commit fb8ffb4 into main Nov 11, 2026
16 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant