update system prompt to hopefully make it easier for Lexi to understand

This commit is contained in:
2025-08-04 21:08:47 +00:00
parent 75fa4cea8b
commit 88a0710c55

View File

@ -97,7 +97,7 @@ const generateOllamaRequest = async (
} }
// Simplified user message (remove [/INST] as it's not needed for Llama 3) // Simplified user message (remove [/INST] as it's not needed for Llama 3)
const userMessage = `${notification.status.account.fqn} says: ${notification.status.pleroma.content["text/plain"]}`; const userMessage = `${notification.status.account.fqn} says to you: \"${notification.status.pleroma.content["text/plain"]}\".`;
let systemContent = ollamaSystemPrompt; let systemContent = ollamaSystemPrompt;
if (replyWithContext) { if (replyWithContext) {
@ -105,13 +105,13 @@ const generateOllamaRequest = async (
systemContent = `${ollamaSystemPrompt}\n\nPrevious conversation context:\n${conversationHistory systemContent = `${ollamaSystemPrompt}\n\nPrevious conversation context:\n${conversationHistory
.map( .map(
(post) => (post) =>
`${post.account_fqn} (to ${post.mentions.join(", ")}): ${ `${post.account_fqn} (said to ${post.mentions.join(", ")}): ${
post.plaintext_content post.plaintext_content
}` }`
) )
.join( .join(
"\n" "\n"
)}\nReply as if you are a party to the conversation. When 'nice-ai' or 'Lexi' is mentioned, the user is speaking to or referencing you. Prefix usernames with '@' when addressing them.`; )}\nReply to the user who addressed you. Examine the context of the entire conversation and make references to topics or information where appropriate. When 'nice-ai' or 'Lexi' is mentioned, the user is speaking to or referencing you. Prefix usernames with '@' when addressing them.`;
} }
// Switch to chat request format (messages array auto-handles Llama 3 template) // Switch to chat request format (messages array auto-handles Llama 3 template)