Repository navigation
Cut the reaction frame from dialog replies instead of re-sampling - #258
Merged
Merged
Conversation
At temperature 0.2 a re-sample repeats the rejected opener, and the prod replies after #257 showed it: the same «ну ты и…» came back while each re-sample cost a full Gemma call. What reaches the chat and the history is what the next turn imitates, so the frame is now cut from the reply. - Cut an opener that only reacts to the message or rates the person («Имя, ну ты и…!», «Ха-ха!», «Ой, всё, …!»), a sentence that quotes the user's message back with a guess at its meaning, and a closing promise of a generation no call started, when something else remains. - Re-sample once only when the opening still repeats one of the bot's last eight replies, or when the reply is only a promise. - Skip the review for custom personas. - Ask the model not to start a reply with the person's name. - Restore the default dialog model output retries to 1.
Owner
Author
|
Danger prompt warning: intentional. Only the text of the |
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.
Problem
After #257 (deployed 2026-10-13 22:43Z) the repeated-opening guard re-sampled about one turn in five, and at temperature 0.2 the second sample usually came back with the same opener («Хасн, ну ты и философ!» → «Хасн, ну ты и философ!»). With
DIALOG_MODEL_OUTPUT_RETRIES=5other validators burned up to six Gemma calls per turn before the fallback, and some turns ran out of budget. The text that reaches the chat is also what the next turn imitates, so a delivered template keeps the chat infected.Changes
openplotva-dialog::reply_shape::review_replycuts, when at least three words remain:aifarm.rsdelivers the reviewed text, so the history stores it too._shared_core.promptno_greetings: do not start a reply with the person's name.DEFAULT_DIALOG_MODEL_OUTPUT_RETRIESback to 1; production env was set to 1 on 2026-10-13 23:3xZ.Measurement
«бл**ь»-style text stay as they are.no_greetingsreplay on 122 production requests through production Gemma: replies starting with a vocative name 25% → 20%; tool calls on the 12 tool turns 10 → 10 (native 7 → 6); reply length unchanged.Checks
cargo fmt --all --checkcargo clippy --workspace --all-targets -- -D warningscargo test -p openplotva-dialog,-p openplotva-llm,-p openplotva-config,-p openplotva-prompts,-p openplotva-app --lib dialog_jobs