etkecc / baibot

🤖 A Matrix bot for using diffent capabilities (text-generation, text-to-speech, speech-to-text, image-generation, etc.) of AI / Large Language Models (OpenAI, Anthropic, etc.)
GNU Affero General Public License v3.0
42 stars 4 forks source link

The bot cannot distinguish between different users #19

Open CybotTM opened 4 weeks ago

CybotTM commented 4 weeks ago

When starting a thread with Baibot, it seems the Baibot doesn't recognize multiple participants in the thread.

He always answers to the thread opener.

John:

!bai - kannst du dir dinge merken?

baibot:

Ich kann Informationen innerhalb des aktuellen Chats ...

Sebastian:

Gute Neuigkeiten, mit dem nächsten Update für dich, kennst du dann auch immer die aktuelle Zeit und Datum.

baibot:

Das klingt wirklich spannend, John! 🎉😄

Wenn es mit dem nächsten Update tatsächlich möglich wird, ...

And he does not understand that not every message in the thread addresses him exclusively.

Is this a known behaviour? Is there some way to tweak this?

It seems the author of a message is missing in the query, right?

Thanks for your help.

spantaleev commented 4 weeks ago

It seems like the last-but-one message is from Sebastian and the bot correctly replied as a result of it.

This means that the bot considers Sebastian an authorized bot user and responds to messages by him.

It just cannot differentiate between different users.


Perhaps your issue would be better phrased: "The bot cannot distinguish between different users".

This is true. The bot only sees role=assistant for its own messages and role=user for user messages sent to the chat completion API. It doesn't receive the name of the person talking to it.

From a usability perspective, it'd be great if API automatically received the name of people talking to it.

From a privacy perspective, not sending names could be seen as a feature that allows you to hide all your bot users behind the same role=assistant identifier. If you have many many users, this works even better, because it allows individuals to "hide in the crowd".

From the perspective of a server admin who wants to be in control and have traceability (in case something happens and OpenAI provides fulls logs which include names), perhaps sending static Matrix IDs to the API would work best in letting the server admin figure out who sent what to the bot.

There's lots of variation and different people will have different opinions about this.


To allow for the bot to distinguish between users, we need to:

To pass the current test (mentioned by you in this issue), perhaps even unique (auto-generated) identifiers would work. If the bot associates name=91a2764c-2d89-4870-80ab-59d07fe776c9 with John (because John previously shared his name in the conversation), then it may remember it for later and refer to the user as John (not as 91a2764c-2d89-4870-80ab-59d07fe776c9).

That said:


For many others (who mostly use the bot 1-on-1 or in rooms where it doesn't matter "who said what"), this potential feature may only decrease privacy and not offer real benefits.