Repository navigation
feat: established-name list and a per-chapter new-name budget - #294
Merged
Merged
Conversation
A generated chapter invented three place names that never appear in the preceding
58 chapters. Invention is legitimate — the plot must be able to leave the county —
but invented proper nouns enter canon through the analysis pipeline and compound.
Three tiers instead of a ban:
- reuse established names (characters, aliases, organisations, the chapter outline's
own names) — injected as a short block near the end of the prompt;
- allow at most 2 new proper nouns per chapter, each anchored to a known place or
organisation;
- one-off places stay generic ("a neighbouring town") because naming invites reuse.
`prompt_names.build_established_names_block` builds it from characters + the
current outline with hard caps so the block stays small. Wired into all three
chapter generation paths right before the writing-spec tail; a source guard keeps
the wiring from being dropped silently.
Verified on the affected chapter: the three invented names are gone and the text
uses only established names.
Refs #293
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #293.
Problem
A generated chapter invented three place names absent from the preceding 58 chapters. Invented names are not wrong by themselves — the story has to leave the county — but they enter canon through analysis (chapter → facts → world settings → next prompt) and compound.
Balance: three tiers, not a ban
Implementation
app/services/prompt_names.pybuilds the block fromcharacters(name/aliases/organisation flag) plus the chapter's outline (characters,scenes, title), with hard caps (12 people, 8 orgs, 8 outline names, 4 scenes, 2 aliases each) so the block stays ~300 characters.Verification (same chapter, before → after)
Naming stabilised. The style numbers moved in the worse direction on this single sample (the chapter is interrogation-heavy), so I am not tuning style from it — that needs a few samples to separate scene effect from drift.
Desensitized per repository policy: no source text, titles or character names are included.