Skip to content

Conversation

@marcelklehr
Copy link
Member

tested with Llama 3.1 8B and Mistral Small 24B

The current prompt would fail with Mistral Small 24B (tested on c.nc.c), ie. it would output swedish titles if sweden was mentioned in the conversation.

…n english

tested with Llama 3.1 8B and Mistral Small 24B

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr marcelklehr force-pushed the fix/title-gen-multilang branch from 297ed81 to 90c1691 Compare February 3, 2026 12:39

try {
$taskId = $this->scheduleLLMChatTask($userInstructions, $systemPrompt, $history, $sessionId, false);
$taskId = $this->scheduleLLMChatTask($userInstructions, $userInstructions, $history, $sessionId, false);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate prompt for moar accuracy.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hehe

but why remove system prompt. That's meant for universal guidelines for the LLMs and probably should be taken into account here as well.
does the default one have a negative effect on the response?

Copy link
Member Author

@marcelklehr marcelklehr Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the two prompts are competing for the llm's attention and IMHO the general assistant guidelines are not really needed for title generation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Marcel here. The "chat" system prompt won't help much on generating a title.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah I see that now. Maybe the language guidelines should only be in the system prompt, the user instructions could be about only outputing the title and the examples (which are noice).

but it's alright for the title generation I suppose if it's not user-influenced.

'role' => $message->getRole(),
'content' => $message->getContent(),
]);
], JSON_THROW_ON_ERROR);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Throw JSON errors

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional change.

@marcelklehr marcelklehr merged commit ab675c7 into main Feb 3, 2026
16 checks passed
@marcelklehr marcelklehr deleted the fix/title-gen-multilang branch February 3, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants