Reuse prepared glossary data across stage sections
This commit is contained in:
@@ -37,9 +37,9 @@ Shared proposal-generation plumbing is centralized in:
|
||||
Module packages own:
|
||||
- prompt selection (`internal/prompts` prompt IDs).
|
||||
|
||||
`proposal_generation.BuildProposalVariables` encodes the glossary, selected
|
||||
transcript section, and trimmed description once for all four modules. PromptKit
|
||||
renders their embedded definitions from those variables and validates the
|
||||
Each stage prepares the encoded glossary context and protected spellings once.
|
||||
Proposal generation adds the selected transcript section and trimmed description
|
||||
for each request. PromptKit renders the selected definition and validates the
|
||||
correction-set schema before Audita maps proposals. Domain validators still
|
||||
check confidence, applicability, protected glossary terms, and replacement
|
||||
policy. Model-facing segment IDs are one-based positions within the proposal
|
||||
|
||||
@@ -120,10 +120,11 @@ is covered by [report assembly](diagnostics-reporting.md).
|
||||
|
||||
## Supplemental Validation Context
|
||||
|
||||
Request construction prepares one segment-position lookup and a matcher from the
|
||||
selected context entries for all candidates. Context selection remains candidate-specific,
|
||||
including the proposed replacement text. The independent protection view is used
|
||||
by the deterministic guard and application check.
|
||||
Each stage prepares a context matcher and indexes its selected glossary entries
|
||||
by identity. Request construction uses a segment-position lookup and returns
|
||||
matched entries in selection order for each candidate, including matches in the
|
||||
replacement text. The deterministic guard and application check share the
|
||||
stage's separate protection matcher.
|
||||
|
||||
Each candidate includes the immediately preceding and following source segments
|
||||
available within its fixed chunk, labeled `preceding` or `following` with speaker,
|
||||
|
||||
Reference in New Issue
Block a user