Add transcript description prompt context

This commit is contained in:
2026-05-13 12:13:32 +00:00
parent de99467ede
commit ebbd2c8a63
27 changed files with 542 additions and 65 deletions

View File

@@ -221,6 +221,7 @@ Implemented config surfaces include:
- module list
- primary and validation LLM settings
- total/proposal/validation LLM concurrency controls
- transcript description context (`--transcript-description`)
- section token controls and target sections
- confidence thresholds
- normalization controls
@@ -229,6 +230,25 @@ Implemented config surfaces include:
Current caveat:
- LLM/module-related settings are active for default and explicit module-run paths.
Transcript description behavior:
- `--transcript-description` is a process-flag input for optional user-supplied background context.
- runtime config stores this value in `Config.TranscriptDescription` after CLI trimming and length validation.
- default value is empty; empty values produce no prompt context section.
- this value is intentionally non-secret and appears in effective config and invocation metadata artifacts.
## Implemented transcript description prompt context
Transcript description context is wired through production prompt paths:
- proposal prompts for `glossary`, `homophones`, `spoken_word`, and `grammar`;
- LLM-backed validator prompts for spoken-form plausibility, meaning reversal, editorial review, grammar review, and spoken-word review.
Prompt guardrail semantics are consistent across modules and validators:
- transcript description is labeled as "background context only";
- it may help interpret ambiguous terms;
- it must not override transcript content;
- the model must not invent corrections, facts, names, events, motivations, or speaker intent from this description.
Generated transcript descriptions remain deferred and are not implemented in the current runtime.
## Implemented structured LLM infrastructure
`internal/framework/contracts` now defines a typed structured-completion contract:
- `StructuredLLMClient.CompleteStructured(ctx, req, out)`

View File

@@ -691,6 +691,13 @@ The description should be included in every proposal and validator prompt as bac
The prompt should clearly state that the description may help interpret ambiguous terms but must not override the transcript.
Implementation status (2026-05-13):
- implemented via `audita process --transcript-description <text>`;
- stored in runtime config as transcript description context and propagated through proposal-generation and LLM-validator prompt builders;
- prompt text explicitly marks this context as background-only and non-authoritative;
- prompt text explicitly forbids inventing corrections, facts, names, events, motivations, or speaker intent from the description;
- empty descriptions do not add blank context sections.
Generated transcript descriptions should remain opt-in or deferred. If implemented before 1.0, they should be:
- explicitly requested;