Skip to content
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

The bot cannot distinguish between different users #19

Open
CybotTM opened this issue Oct 9, 2024 · 1 comment
Open

The bot cannot distinguish between different users #19

CybotTM opened this issue Oct 9, 2024 · 1 comment

Comments

@CybotTM
Copy link

CybotTM commented Oct 9, 2024

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
Copy link
Contributor

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:

  • start making use of the optional name field (messages[*].name) to provide a name, not just a role. See the chat completion request parameters

  • make it possible for people to enable this user-exposing behavior and possibly default it to "disabled" to retain privacy

  • possibly make the name that gets sent configurable. I can think of at least the following options (discussed here):

    • Don't send: never sends a name for anyone (the current behavior of baibot)
    • Auto-Generate identifier: sends an auto-generated identifier (likely derived from the Matrix ID of the person and possibly the current conversation thread id). Making identifiers different per-thread allows for better anonymization
    • Matrix ID: sends the Matrix ID of the person (e.g. @john:example.com)
    • Display Name: sends the display name of the person (e.g. John). This display name could be different in different rooms and could change over time
    • Matrix ID + Display Name (a combination of the Matrix ID and the Display Name). This could be useful to guarantee uniqueness, as multiple users can share the same display name and get the bot confused

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:

  • I haven't verified if this works
  • The bot may refer to the 91a2764c-2d89-4870-80ab-59d07fe776c9 user by that name, unless the user explicitly shared his real name ( John). Having to share your name each and every time can be annoying - usability is poor compared to sending your Display Name by default, etc.

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.

@spantaleev spantaleev changed the title Multiple users in thread are ignored The bot cannot distinguish between different users Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants