-
Notifications
You must be signed in to change notification settings - Fork 28
Fix(ChattyLLM): Fix title generation to work with languages other than english #451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…n english tested with Llama 3.1 8B and Mistral Small 24B Signed-off-by: Marcel Klehr <mklehr@gmx.net>
297ed81 to
90c1691
Compare
|
|
||
| try { | ||
| $taskId = $this->scheduleLLMChatTask($userInstructions, $systemPrompt, $history, $sessionId, false); | ||
| $taskId = $this->scheduleLLMChatTask($userInstructions, $userInstructions, $history, $sessionId, false); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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>
julien-nc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional change.
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.