Share prompt instructions and simplify validation helpers
This commit is contained in:
@@ -13,9 +13,12 @@
|
||||
|
||||
PromptKit reads the embedded definitions and renders their system and user
|
||||
messages from named string variables. The role-bound adapter supplies
|
||||
`HardeningPolicy` from the single embedded `assets/shared/prompt_hardening.md`
|
||||
fragment after caller variables, so callers cannot replace that policy. Proposal prompts receive the
|
||||
section JSON, glossary JSON where used, and transcript description block.
|
||||
`HardeningPolicy` alongside `ProposalContract` and `ValidationContract` from
|
||||
embedded fragments under `assets/shared`, after caller variables so callers cannot replace those
|
||||
instructions. Common literal-span and identity guidance lives in the proposal
|
||||
fragment; shared candidate-reference, context, and confidence guidance lives in
|
||||
the validation fragment. Module-specific policies and examples remain in YAML.
|
||||
Proposal prompts receive the section JSON, glossary JSON where used, and transcript description block.
|
||||
Validator prompts receive the correction payload and description block.
|
||||
The prompt assets retain the prior task instructions and output-schema
|
||||
association. The role-bound runtime supplies the complete JSON Schema output contract
|
||||
|
||||
@@ -77,8 +77,10 @@ unavailable; production schema validation still rejects out-of-range confidence
|
||||
before reconciliation. A partially unavailable batch records one failed
|
||||
operation with only those requested indices, while a successful batch with
|
||||
ignored extras records a decision-filtering recovery. Fatal errors stop the
|
||||
chain without returning unchecked candidates as approved. Reconciliation makes
|
||||
no semantic retry or extra model call; guided recovery remains
|
||||
chain without returning unchecked candidates as approved. A local result builder
|
||||
retains already-collected decisions and operations on early returns; full
|
||||
cardinality checks and final sorting remain explicit on completed paths.
|
||||
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
|
||||
@@ -118,6 +120,10 @@ is covered by [report assembly](diagnostics-reporting.md).
|
||||
|
||||
## Supplemental Validation Context
|
||||
|
||||
Request construction prepares one segment-position lookup and protected vocabulary
|
||||
for all candidates. Glossary selection remains candidate-specific, including the
|
||||
proposed replacement text.
|
||||
|
||||
Each candidate includes the immediately preceding and following source segments
|
||||
available within its fixed chunk, labeled `preceding` or `following` with speaker,
|
||||
text, and categories, plus glossary entries whose names, aliases, or
|
||||
|
||||
Reference in New Issue
Block a user