Simplify references and output instructions in LLM prompts
This commit is contained in:
@@ -42,7 +42,13 @@ transcript section, and trimmed description once for all four modules. PromptKit
|
||||
renders their embedded definitions from those variables and validates the
|
||||
correction-set schema before Audita maps proposals. Domain validators still
|
||||
check confidence, applicability, protected glossary terms, and replacement
|
||||
policy. Shared context encoding lives in `internal/framework/promptcontext`.
|
||||
policy. Model-facing segment IDs are one-based positions within the proposal
|
||||
request. Generation maps returned references back to the current chunk's actual
|
||||
segment IDs, preserving response order and multiple proposals per segment.
|
||||
Unknown references become invalid-target candidates for the existing domain
|
||||
checks; they are never interpreted as actual transcript IDs. Debug request
|
||||
metadata records `segment_ids` in local-reference order (reference 1 is the
|
||||
first entry). Shared context encoding lives in `internal/framework/promptcontext`.
|
||||
An empty `corrected_text` deletes the identified span when the resulting segment
|
||||
remains nonblank. Whitespace-only original spans can express spacing corrections;
|
||||
matching stays literal under each module's replacement policy. No automatic
|
||||
|
||||
@@ -42,9 +42,14 @@ pass these values through the role-bound adapter. See the
|
||||
|
||||
Proposal instructions describe literal matching, each module's replacement policy,
|
||||
source-based proposal identity, and confidence in whether an edit is warranted.
|
||||
Validator instructions distinguish correction indices from segment IDs and confidence
|
||||
in the verdict from the verdict itself. The grammar article exception and glossary
|
||||
mishearing exception apply consistently across their instructions.
|
||||
Proposal `id` and validator `correction_index` values are short, one-based
|
||||
references scoped to each request, not internal transcript/proposal identities.
|
||||
Mapping belongs to [proposal generation](modules.md) and
|
||||
[validator reconciliation](validators.md). Validator instructions distinguish
|
||||
confidence in the verdict from the verdict itself. Compact output examples
|
||||
illustrate the supplied schema without requiring fixed JSON formatting or key
|
||||
order. The grammar article exception and glossary mishearing exception apply
|
||||
consistently across their instructions.
|
||||
|
||||
Only the three active validator definitions are retained. The unused internal
|
||||
`grammar_review` and `spoken_word_review` definitions and type selections were
|
||||
|
||||
@@ -63,12 +63,14 @@ Oversized single inputs are rejected with a consolidated
|
||||
model failures make only their batch candidates unavailable while other
|
||||
batches continue. PromptKit validates each complete response against the
|
||||
validator-decision JSON Schema and performs configured structural repair before
|
||||
Audita receives decoded decisions. Audita then reconciles those decisions with
|
||||
the correction indices requested in that batch: one usable entry keeps its
|
||||
Audita receives decoded decisions. Each actual batch presents candidates
|
||||
numbered from 1, independent of their internal proposal indices. Audita then
|
||||
reconciles those local references: one usable entry keeps its
|
||||
approval or editorial rejection; a missing or duplicate requested entry makes
|
||||
only that candidate unavailable; unexpected indices are ignored. An empty list
|
||||
makes all requested candidates unavailable. Results are ordered by request
|
||||
identity and satisfy strict internal cardinality before the runner advances
|
||||
makes all requested candidates unavailable. Decisions and unavailable indices
|
||||
map back to internal proposal identities; results are ordered by request identity
|
||||
and satisfy strict internal cardinality before the runner advances
|
||||
approved candidates. An unavailable candidate never advances as approved.
|
||||
Invalid confidence in a decoded test double also makes only its candidate
|
||||
unavailable; production schema validation still rejects out-of-range confidence
|
||||
@@ -79,6 +81,12 @@ chain without returning unchecked candidates as approved. Reconciliation makes
|
||||
no semantic retry or extra model call; guided recovery remains
|
||||
[deferred](../roadmap/future.md#domain-aware-response-recovery).
|
||||
|
||||
Debug request metadata records `proposal_indices` in local-reference order
|
||||
(reference 1 is the first entry). Raw decoded responses and ignored indices use
|
||||
local references; reconciled decisions and unavailable indices use internal
|
||||
proposal indices. Batch token estimates use the same locally numbered payload
|
||||
as prompt encoding.
|
||||
|
||||
## Decision and Rejection Reporting
|
||||
|
||||
Runner collects decisions, rejected candidates, and operation outcomes. Ledger
|
||||
@@ -111,9 +119,11 @@ is covered by [report assembly](diagnostics-reporting.md).
|
||||
## Supplemental Validation Context
|
||||
|
||||
Each candidate includes the immediately preceding and following source segments
|
||||
available within its fixed chunk, plus glossary entries whose names, aliases, or
|
||||
available within its fixed chunk, labeled `preceding` or `following` with speaker,
|
||||
text, and categories, plus glossary entries whose names, aliases, or
|
||||
recognized plurals appear in its original/resulting text or those neighbors.
|
||||
Glossary matching reuses the protected vocabulary; entries retain glossary order.
|
||||
Model-facing candidate and neighboring context omit internal segment IDs.
|
||||
This supplies evidence such as a troupe definition for a proposed `Jesters`
|
||||
correction or an adjacent speaker turn explaining deliberate repetition. A correction
|
||||
already clear from its own segment does not require such evidence. No audio,
|
||||
|
||||
Reference in New Issue
Block a user