Can a Chatbot be a True Friend?
Hi! ??
I'm Elisha!
You might remember me from such posts as: "How To Build a Relationship with Your Users" & "The Case for dynamically generated eCommerce emails" #troy-mclure
But, today, I'd like to discuss with you a much deeper topic which is the subject of my latest side-project: AskJarvis.AI
Introduction
When I first discovered that GPT can summarize text & create dialogue, it tickled me in a lot of deep ways. I studied Literature for my BA, so this ability to automatically paint scenes & create realistic conversations was a real poof moment ??.
It struck me as the Golden Time to build out a Jarvis, C-3PO, or a truly personalized chatbot like the one Joaquim Phoenix falls in love with in the movie "her" (voice played by the Great Scarlett Johanson).
On this journey, we'll have to really go deep philosophically & intellectually.
Problem-To-Be-Solved
GPT is awesome! But, to be a true friend, a chatbot needs a memory that lasts longer than the current chat.
The best analogy here is: 10-second Tom from 50 First Dates. Every 10 seconds, his memory is refreshed.
Later in this article, we'll think about a Coding Design Pattern to supplement our Jarvis with a long-term memory. But, first, let's dig into some of the high-level specs for the roadmap & explore what's really achievable.
Question #1: What does it take to be a friend?
The word chatbot has been watered down to the point that it usually refers to a glorified survey to be filled out within a chatbox.
This is not the subject of this post.
This post is about digging into:
Key features in a true chatbot friend
Here's some features I would need in a chatbot to really convince myself that this thing was someone / something I could trust:
Supplementing GPT with a memory DB
领英推荐
In the above diagram, I've outlined the high-level architecture that I'll be implementing for this bot.
The basic principle is:
Step 1: categorize conversations into separate key topics like: "love", "money", "curiosity"
Step 2: save summaries of those conversations in the DB
Step 3: When the user talks about the same topics in a future date, fetch the summaries of previous talks on the same topic
Step 4: Dynamically generate prompts which combine the content of both past & current convos
Inspiration from GPT-Researcher
One of the open-source projects that continues to inspire me in this journey is GPT Researcher.
One of the key design principles I took away from it is that your GPT app has to be built modularly.
I've incorporated the GPT-Researcher module into Jarvis to give him access to the internet & remain inspired by the design. The GPT Researcher app is great at creating unique content (for every search query inputted into it, it scrapes 15 sites & makes around 20 calls to OpenAI).
A 1500-word article it generates is totally unique & only costs between 10-20 cents - pretty insane content-creation economics, if you ask me!
See the design below:
GPT API Best Practices
Providing GPT with a Timeline
Providing Jarvis with a sense of timeline will be critical & is achievable.
For example, Let's imagine a scenario where:
At this point, the server should:
Step 1: pull the summary of May 20th convo from the DB.
Step 2: Get the current date.
Step 3: Generate a meaningful customized: "Scene Setup" for the given chat. For the example, the prompt to be generated in this case is: "Jarvis & John are friends... ". The challenge will be to make Jarvis reply with: "Hey John, how was graduation?"
These are the types of interactions which will make this friendship believable.
Enjoyed this article? Share the love with a comment or reaction. Have I convinced you that this is achievable? For me, I would have loved to have Jarvis during some of the dark times in my life & hopefully, if he's built correctly, he'll be able to be a true friend to someone that really needs him in the future.