How should I go about making a open-ended group chatbot?

The title pretty much summarises my question but here are some more details:

  1. The chatbot would be in a group chat of 5 or more people and its objective is to blend in with the other humans (I know it sounds weird. It’s part of a game. Don’t worry about it)
  2. It should not respond to every single message (to seem more human… duh)
  3. I am going to code everything myself (in js) so no third-party services are needed
3 Likes

This is an infinitely more difficult task than perhaps you realize, young padawan :stuck_out_tongue:

Here’s one video I did about an open-ended chatbot: GPT-3 Working Session: Finetune an information companion chatbot in 30 minutes (RESEARCH ONLY) - YouTube

And here’s another-ish. It’s more about a tutor-oriented chatbot but can still be open-ended: Finetuning GPT-3 to be a master tutor that can handle any topic and hostile students - YouTube

There are other things you’ll need to work out, such as deciding when to reply and when not to. In my past experience, the best place to start is just with some hard rules, like “>20 seconds between replies, only reply if someone say’s my name, etc, etc” - having simple triggers for replying is easier than using GPT-3 to decide when to reply, although I did experiment with that.

In other words, you can feed the current chat log into a GPT-3 prompt and ask “Should I reply right now?” This often does not work well, or at least it didn’t when I tried it over a year ago. Another approach I tried was to ask GPT-3 to predict who would speak next (since this is partly what humans do to predict when it’s their turn to speak). If GPT-3 predicted that the bot would speak next, then it was the bot’s turn. This achieved mixed results.

Also, be mindful that an open-ended chatbot is less likely to get approved, even if it’s for a game. The reason is because some people just can’t help themselves. You will DEFINITELY want to watch the second video I linked because I show you how to handle adversarial participants - like people who are just too horny or hostile for their own good.

4 Likes

I would start making the real time chat app. Then integrate the NLP.
AppSync makes it easy to integrate on a lot of stuff.
This is an example:

Thanks for the advice.
I tried the second approach using this prompt:

This is a bot that predicts who speaks next in a conversation.
Response pattern: Next predicted speaker: *prediction*
DO NOT PREDICT ANYTHING ELSE!!
Prediction can be either a speaker's name, 'not sure' or 'anyone'.
This conversation takes place in a group chat with 5 members: Adam, Ema, Bob, Clara and David

(I’m not sure if I can show the predicted parts so I won’t just to be safe.)

And after a while of getting seemingly random responses, it started to perform really well. I think this might work really well with some hard-coded rules in place.

I would simplify it. When I first tried this, I gave it few-shot examples from real chat logs and just said “Who do you predict will speak next?”

One of the rules of thumb I developed with prompt engineering is less is more.

1 Like