Skip to content

feat(config): add glossary prompt variable - #31

Merged
odsod merged 1 commit into
mainfrom
glossary-prompt
Sep 15, 2026
Merged

odsod merged 1 commit into
mainfrom
glossary-prompt

Conversation

@odsod

@odsod odsod commented Sep 15, 2026

Copy link
Copy Markdown
Owner

Why

A list of mistranscriptions to fix is brittle. One concept arrives in several
wrong spellings, and a wrong form often collides with a real word. Counts from
four months of real transcripts:

Concept Surface forms
cut entry katt 35, katten 19, cut entr 14, cuttin 5
Encore encore 70, ankor 14
BigQuery bigquery 193, bigshare 2

katt and katten are ordinary Swedish words, so a mapping would rewrite every
genuine mention. A list of correct terms lets the model decide from context.

What

  • Add promptVars.glossaryFile. The recorder reads a user-owned Markdown term
    list and renders it into the cleanup and summarize prompts.
  • Prompt rules match on sound and context, and forbid inserting a term that was
    not said. A collision example covers the katt case.
  • A missing glossary file warns on stderr and continues, because the file is
    user data that the recorder does not own.
  • Sections are conditional, so an unset glossary leaves the prompts unchanged.
  • Update the README table, the example config, and the tests.

Notes

  • The list holds correct spellings only. No wrong-to-right mappings.
  • The same Glossary field feeds both prompts, so summaries also use the
    corrected spellings.

Test plan

  • mise run build (lint, test, tidy, goreleaser check)
  • Glossary renders in the cleanup and summarize prompts
  • Missing glossary file warns and renders nothing
  • Unset glossary omits both sections
  • Load reads promptVars.glossaryFile from JSON
  • recorder prompts cleanup and recorder prompts summarize render a live
    glossary file

Term lists beat mistranscription mappings, which are brittle: one concept
arrives in several wrong spellings, and a wrong form often collides with a
real word.

- Add promptVars.glossaryFile, rendered into the cleanup and summarize prompts
- Missing file warns and continues, because the glossary is user data
- Prompt rules match on sound and context, and forbid inserting a term
- Update example config, README table, and tests
@odsod
odsod merged commit e68cfcb into main Sep 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant