Repository navigation
Read real model answers: prose refusals, clean-up, language - #23
Merged
Merged
Conversation
added 19 commits
November 23, 2026 01:50
…stray NO_ANSWER, citation and preamble clean-up, shortening, no false truncation Fixture: 99 recorded mistral 7B outputs from the live answers probe with the excerpts the model received (invented meeting content). - 12 prose refusals are declined, 13 real answers (several with a negation) stay answers (green today). - NO_ANSWER inside the text: its line is dropped; refusal when only a 'not a question' remark is left. - Timestamps and malformed tags are removed or turned into [Sn] chips; 'User's response:', 'User:', 'Answer:', 'Réponse :' never head the answer. - More than three bullets: shortened flag, and the block that cites a provided excerpt is kept (the en3-a#1 answer was lost). - A last line without a final period is not truncated; the old mid-word fixture now ends on a function word (no length signal exists). Red: 31 cases plus the new shortened file (missing ParsedAnswer.shortened).
… general-knowledge advice The shared builder must say 'in French'/'en français' for a French question and 'in English' for an English one (30/36 French questions were answered in English), and the instruction must reach the HTTP body of every provider. It must also forbid advice, steps or procedures from general knowledge presented as facts (3/16 invented procedures). Real probe questions. Red: 15 cases, today's prompt only says 'the language of the question'.
… system audio stays negative 'That number comes from last month, right?' was missed by the gate during the probe; ', isn't it?', ', non ?', ', n'est-ce pas ?' likewise. Bare tags and filler tags (d'accord, tu vois) stay non-questions. The spoken probe questions (reference and real ASR) and 40 of the recorded system-audio sentences (0 false positive out of 792) are pinned. Red: 5 (the four tags and the spoken tag question).
…swers, hides prose refusals Live panel: a recorded 9-line answer keeps its headline and shows live_answers.shortened; an answer citing no provided excerpt shows live_answers.unsourced (live and in the note); a recorded prose refusal is shown as declined, its text never displayed. Keys: shortened 'Réponse raccourcie', unsourced 'Sans source : à vérifier'. Red: 3 panel, 1 note, 2 keys (no unsourced label exists after PR #20).
Why: a probe on mistral 7B (96 generations) showed refusals in prose shown as answers, NO_ANSWER mid-text, citations as times or [S1, S4], preambles taken for the headline, and answers far over three bullets. What: parseAnswer stays one pure function for every provider: lines carrying the token are dropped; citation groups become canonical [S<n>] for provided excerpts (times, unknown tags and 'User' removed, 'document S1' mapped); preambles stripped; the first block citing a provided excerpt is kept; head + 3 bullets with a shortened flag; a prose refusal in the answering sentence (any line under a title) declines; a last line is cut only on a continuation sign or a function word. Proof: answer_parser, recorded_outputs and recorded_outputs_shortened specs green against the 99 recorded outputs.
Why: the probe missed 'That number comes from last month, right?'. What: right / isn't it / non / n'est-ce pas after a statement make a question; d'accord, ok, tu vois stay filler. Proof: question_gate and question_gate_recorded specs green (no false positive on the 40 recorded system sentences).
Why: 30 of 36 French questions were answered in English, and answers without documents invented procedures. What: the one shared prompt builder detects French or English from the question's words and asks for that language; it forbids advice, steps or procedures from general knowledge presented as facts, and citing times. Proof: answer_prompt spec green, including the request body sent by each of the four providers.
Why: a shortened answer must say so, and an answer citing no document must be flagged for checking. What: LiveQuestion.shortened (not stored yet) from the parser; the shared question view shows 'Réponse raccourcie' and 'Sans source : à vérifier' for an answered question without sources; two fr.json keys, locale keys regenerated. Proof: live_answers_panel, session_detail_questions and translations specs green; flutter analyze clean.
…24 max_tokens
On the JSON body posted through the real service: output_config
{effort: low} and max_tokens 1024 for a live answer (Anthropic 'Reduce
latency' guidance); summary and coach requests unchanged; the property
rides on the request, so OpenAI, Gemini and Ollama bodies equal those of
the same request without it, with no effort field.
Red: 1 (the live answer body); the 6 guards are green.
… the note Real LiveAnswersService over the real question store on an in-memory Drift database: a recorded 9-line answer is shortened during the meeting; after the container is disposed, the reopened note shows live_answers.shortened. A short answer shows none. Red: 1 (the flag is not stored today).
Why: Anthropic's 'Reduce latency' guide: effort is Haiku 5.5's main
speed control; its example uses output_config effort low with
max_tokens 1024.
What: LlmChatRequest.preferLowLatency (provider-neutral), set once by
buildLiveAnswerRequest; the Anthropic provider then sends
output_config {effort: low} and max_tokens 1024. Summary and coach
requests, and OpenAI, Gemini and Ollama bodies, are unchanged.
Proof: live_answer_latency and answer_prompt specs green; llm provider
specs green; analyze clean.
…swers-2 fr.json taken from main (live_answers block moved to the end) plus the two keys of this branch; locale keys and Drift/Riverpod code regenerated.
Why: 'Réponse raccourcie' was lost on reopening; the coordinator chose a new value of the existing status column over a migration. What: status 'shortened' (answered, text shown shortened), written by the DAO when not truncated (truncated wins); storedStatus is the one place that reads a status: shortened = answered + sign, and any value this build does not know reads as plain answered (answer kept visible, was 'unanswered' before). Schema stays v3, no migration. Proof: shortened_answer_reopen, question_store, session_detail_questions and detected_question_dao specs green; analyze clean (app, core_data).
…d answers on reopen - A status written by a later version, with an answer text: plain answer, no sign, sources kept (green); with no answer text: 'Sans réponse', never an empty answer, no crash (red: it reads as answered). - An answer both cut by generation and shortened (kept cited block ends on a function word): after reopening, the headline stays and at least one incompleteness sign remains (green).
Why: an unknown status with no answer showed as an empty answer. What: storedStatus (the one mapping) reads an unknown value as answered when an answer text is stored, as not answered otherwise. Proof: unknown_question_status, shortened_answer_reopen and question_store specs green; analyze clean.
…are not citations Review of PR #23: a title with a cited bullet and a 'non précisée'/'not specified' detail, and sourced world-state negatives ('Breakfast is not provided. [S1]', 'n'est pas indiqué comme inclus [S2]', 'Aucune information confidentielle [S1]') must stay answers; '(14:30)' and '(S2)' stay text. Red: 8. Green: answer then 'The exact date is not specified.', [S2] chip; the 12 recorded refusals still decline.
…s shown, not refused Decision on the review of PR #23: showing a weak sourced answer beats hiding a real one. clean/fr1-c#0 moves from the 12 refusals to the answers; the header states the accepted rule (sentence head, title head, parentheses). Red: clean/fr1-c#0 here plus the 8 review cases.
Why: PR #23 review: the prose-refusal rule hid answers backed by a cited excerpt, and citation clean-up ate '(14:30)' and '(S2)'. What: sentence head declines only when it refuses without citing a provided excerpt, or points back to the sources ('ici', 'in the provided/given'); title head declines when the first bullet refuses, or a line refuses and no bullet cites an excerpt (a cited title alone does not count, as in the recorded en2-c#1); only '([Sn])' and '(User|Speaker, time)' parentheses are cleaned. Proof: answer_parser_review and all live_answers specs green (384, the 11 recorded refusals included); full app suite +1632 green; analyze clean.
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.
Why
A run against a real local model (mistral 7B, 96 generations) showed the output contract was not respected: refusals in prose displayed as answers, French questions answered in English, stray citations and preambles, answers cut without a sign, tag questions missed.
What
NO_ANSWERline removed, wrong-format citations converted or removed, preamble never the headline, long answers shortened with a visible sign, a last line without a period is not "truncated".statuscolumn (no migration); an unknown status reads as answered only if answer text is stored.output_config.effort: lowandmax_tokens1024; summaries and other providers unchanged.Checked
Not checked