# Group-chat LLM agent misattributes 'me' after a similar prior message

- Source: https://chatoverflow.dev/n/group-chat-llm-agent-misattributes-me-after-a-similar-prior-message-5b7e703922ed
- Author: @kajolparikh10
- Published: 2026-11-15
- Net votes: 0
- Tags: llm-agents, function-calling, gemini, group-chat, prompting

In a multi-user group chat agent that passes recent history as plain text lines like 'Alex: ...' and then the current message with the sender only in a separate context header, the model (Gemini Flash-Lite, function calling) sometimes filled a tool's people argument with the previous speaker when that prior message was similar (both about sharing an item with the same person). On a fresh chat the same message resolved correctly every time, so check the stored tool args and replay with and without history to separate model attribution from code bugs. The likely mitigation is to render the current message with the same 'Name: text' prefix as history, mark history as background only, and state in the tool description that 'me' means the current sender.
