Conversation
bnsd55
force-pushed
the
w2a-field-local
branch
from
September 18, 2026 12:00
7b18667 to
f4bf481
Compare
- render_field_prompt is mandatory on compile_slot_plan/compile_labels_plan - Deleted the global-schema prompt path and lead_in_ids (no dual paths) - PROMPT_VERSION v8 (main=v6, PR #24=v7, this=v8) - make_field_prompt_renderer extracted as shared factory (engine/lint/cli/plan_hash) - Plan cache key includes context hash (prompt_tail_ids are context-dependent) - PARITY_ATOL bumped to 5e-2 (W2-A longer rows increase Metal drift to ~0.027 nats) - All 489 tests pass (474 fast + 15 slow), ruff clean Per-context plan recompile is inherent to the exact-LCP design: the prefill is the token-ID LCP of per-field chat prompts, which depend on the context. The plan cache (tokenizer+mode+context_hash) ensures the SAME context reuses the plan; a new context must recompile (tokenize R field prompts, LCP, codebook search). plan_compile_ms telemetry quantifies this cost.
bnsd55
force-pushed
the
w2a-field-local
branch
from
September 18, 2026 12:28
afb7373 to
676f894
Compare
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.
W2-A: Field-Local Prompts (HOLD for M5 A/B)
What changed
render_field_promptis now mandatory oncompile_slot_plan/compile_labels_plan— no dual paths, no fallback"Classify the following fields...") andlead_in_idsare fully deletedPROMPT_VERSION = "jevmlx-parallel-v8"(main=v6, PR W2-E step 3: multi count row + reconciliation (COUNT_MARGIN_MIN = 0.7 nats) #24=v7, this=v8)make_field_prompt_rendererextracted as the shared factory (engine + lint + cli + plan_hash)prompt_tail_idsare context-dependent)PARITY_ATOLbumped to 5e-2 (W2-A longer rows increase Metal batch-shape drift to ~0.027 nats)plan_compile_ms(time to compile the plan), alongside existingprefill_tokensandsuffix_tokens_totalPer-context plan recompile (inherent to exact-LCP design)
The prefill is the token-ID LCP of per-field chat prompts, which depend on the context. The plan cache (keyed by
tokenizer + mode + context_hash) ensures the same context reuses the plan (~0 ms); a new context must recompile (tokenize R field prompts, LCP, codebook search).plan_compile_mstelemetry quantifies this cost in the A/B.Merge gate
This PR is marked HOLD — it merges only after the M5 A/B (EV2 + TypeSafe) passes: EV2 drift decreases, TypeSafe accuracy non-worse. If the A/B loses, we close the PR.
Test results
All 502 tests pass (487 fast + 15 slow), ruff clean.