Files
multica/server/internal/handler
Bohan Jiang 757b09c801 fix(server): remove the last language seeds from the LLM prompts (MUL-5689) (#6348)
* fix(server): drop the Chinese seed from the chat title prompt (MUL-5689)

chatTitleSystemPrompt carried literal Chinese in two places: a rule that
spelled out "Chinese input → Chinese title", and a formatting example
listing "标题:" as a prefix not to use. It is the same defect as the
quick-actions label rule — a prompt that names a language, even only as a
formatting example, reads as permission to answer in it.

Chat titles are generated from the user's opening message alone, so they
have neither the ALREADY SUGGESTED feedback loop nor an agent reply to be
pulled by. Removing the seed is the whole fix; the language rule stays,
now stated without naming a language.

Nothing is lost by dropping the "标题:" example: chatTitleLabelPrefixes
already strips 标题/题目/主题 (and the English forms) from the model's
output, which is where that guarantee actually lives.

Co-authored-by: multica-agent <github@multica.ai>

* fix(server): correct two inaccuracies in the quick-actions language rule

Both from review on #6345, non-blocking there and deferred to keep that
merge unblocked.

"these instructions" was self-referential: the LANGUAGE RULE is itself an
instruction, so a model reading "ignore these instructions when choosing
the language" could read the rule as disowning itself. It means the
system prompt, so it now says so.

The system prompt claimed the user message "ends with" the LANGUAGE RULE.
It does not — the task line follows it. Reworded to "contains a LANGUAGE
RULE line near the end", which is what the renderer actually produces.
The rule's position is unchanged: still after the conversation and the
replayed labels, which is the part that matters.

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: Bohan-J <bohan@devv.ai>
Co-authored-by: multica-agent <github@multica.ai>
2026-08-04 14:21:25 +08:00
..