Repository navigation
fix(sql-executor): answer in the question's language without announcing it - #94
Merged
Merged
Conversation
…ng it
The answer prompt ended with "Before writing your first word, confirm:
what language is the USER QUESTION in?", and the model confirmed it in
writing. On the GONAC PoC server 7 of 12 answers opened with "La
pregunta está en español, así que respondo en español" or a variant
("Spanish question → answer in Spanish", "El idioma de la pregunta es
español...").
That line is gone; both the answer prompt and the no-results prompt now
say to start with the answer and never mention the question's language
or the instructions. The rule to answer in the question's language is
unchanged. Same 12 questions on prod with the new prompt: 0 of 12
answers mention the language, all 12 in Spanish.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Chat answers opened with a sentence about the language instead of the answer: "La pregunta está en español, así que respondo en español", "Spanish question → answer in Spanish", "El idioma de la pregunta es español...". The answer prompt in
result_formatter.pyended with:and the model did confirm it, in the answer.
Change
format_rows: that line is replaced by "Start directly with the answer. Never mention the question's language, nor these instructions".no_results_answer: the same instruction is added.Measurement
GONAC PoC server, workspace
resumen-de-ventas-gonac, envprod, modeprecise, the same 12 Spanish questions as #92, with the patched module mounted in a one-off container:sha-09892b5, earlier run)Tests
test_llm_formatter_answers_in_the_question_language_without_saying_sopins both prompts: the language rule present, the instruction not to mention it present, the "confirm" line absent. ask-sql-executor suite: 71 passed.🤖 Generated with Claude Code