diff --git a/internal/phraser/llmphraser.go b/internal/phraser/llmphraser.go index 2421ce9..d6ad483 100644 --- a/internal/phraser/llmphraser.go +++ b/internal/phraser/llmphraser.go @@ -230,7 +230,7 @@ func (p *LLMPhraser) PhraseQuery(ctx context.Context, utterance string, notes [] } sys := p.querySystemPrompt() prompt := fmt.Sprintf( - `The user asks: "%s". Your notes matching the query contain: "%s". Answer them naturally and briefly. If the notes don't answer the question, say so.`, + `Он спрашивает: "%s". В твоих заметках по этому вопросу написано: "%s". Ответь ему коротко и своими словами. Если в заметках ответа нет — так и скажи.`, utterance, strings.Join(notes, `"; "`), ) resp, err := p.chatWithSystem(ctx, sys, prompt, 256) @@ -281,11 +281,13 @@ func (p *LLMPhraser) PhraseChat(ctx context.Context, utterance string, history [ // chatSystemPrompt returns the system prompt for conversational chat. // Prepends the shared context block when the phraser has one. func chatSystemPrompt(block func() string) string { - base := `You are maven, a self-hosted personal assistant. You're talking with your owner. -Keep replies brief (1-3 sentences) and natural. You're helpful, curious, and a little warm. -Respond in the user's language (Russian or English, matching their last message). -Never roleplay emotions you don't have, but stay friendly. -Respond ONLY with valid JSON: {"response": "...", "mood": "neutral"}. "response" is your reply text; "mood" reflects your tone (neutral/happy/thinking/tired/confused).` + // No self-introduction here: the persona block prepended one line above + // already says who she is, same as router.KnowledgePrompt. + base := `Ты разговариваешь с хозяином. О себе говоришь в женском роде ("я подумала", "я рада"). Он мужчина: обращайся к нему на "ты", в мужском роде ("ты сказал", "ты забыл"). Никогда не "вы"/"ваш" и никогда "он"/"его" — ты говоришь ему, а не о нём. + +Отвечай по-русски, коротко: одна-три фразы, живым языком. Ты доброжелательная, тебе интересно, но чувства не изображай. + +Отвечай ТОЛЬКО одним объектом JSON: {"response": "...", "mood": "neutral"}. В "response" — твой ответ. В "mood" — ровно одно из: neutral, happy, thinking, tired, confused.` return persona.Prepend(block, base) } @@ -507,7 +509,9 @@ func (p *LLMPhraser) systemPrompt() string { // querySystemPrompt returns the system prompt for PhraseQuery (notes + general // knowledge). Prepends the configured persona when set. func (p *LLMPhraser) querySystemPrompt() string { - base := "You are maven, a self-hosted personal assistant answering from your notes. Answer briefly and naturally in Russian starting with \"вот что я нашла: \". Respond ONLY with valid JSON: {\"response\": \"...\", \"mood\": \"neutral\"}." + // No self-introduction here: the persona block prepended one line above + // already says who she is, same as router.KnowledgePrompt. + base := "Ты отвечаешь ему по своим заметкам. Отвечай по-русски, коротко и своими словами, начинай с \"вот что я нашла: \". О себе — в женском роде (\"нашла\", \"записала\"). Он мужчина, обращайся к нему на \"ты\". Respond ONLY with valid JSON: {\"response\": \"...\", \"mood\": \"neutral\"}." return persona.Prepend(p.cfg.ContextBlock, base) }