Building an ArtificiaI Intelligence (AI) Companion

What happens when your colleagues challenge you to create an AI bot for a speed dating competition at an industry conference? Well, if you’re like me, you take the challenge and create Nathan Hale, the charming AI companion.

Sarah Mercier presenting her AI bot to Megan Torrance

Image description: Sarah is introducing her AI bot, Nathan Hale, to Megan Torrance at the front of a conference presentation stage. Nathan’s DALL-E generated image is on the projector screen beside his voice activated chat interface. The projected picture of Nathan shows a middle-aged man with wavy short brown hair and rugged features wearing hiking gear and standing in front of a mountain landscape.

Creating a Custom GPT, Step-by-Step

It took about four hours to create my AI bot using a typical technology stack. My approach was simple:

  1. Create a custom GPT on ChatGPT-4.
  2. Train the GPT to take on an identity that incorporated the intended user’s specific preferences.
  3. Prompt the GPT to consider a variety of factors about the user in conversations.
  4. Reinforce the GPT’s behavior to better imitate a human interaction.
  5. Ask the GPT for its name.
  6. Use DALL-E to generate a profile picture based on the intended user’s preferences.
  7. Conduct user testing and revise.

The Technology Stack

Nathan Hale is a custom GPT (Generative Pre-trained Transformer) built on the ChatGPT-4 LLM (large language model).

I used Talk-To-ChatGPT, a Google Chrome plugin, for text-to-speech voice integration. This is what allowed Nathan to listen and talk. This plugin uses an API to integrate with ElevenLabs, an AI voice generator, so I was able to select from their wide range of custom voices.

Note: I used our existing Build Capable paid team account for both ChatGPT and ElevenLabs. The Google Chrome plugin is free, but you must provide it with an API to your ElevenLabs account if you want to use a custom voice. You can use the free versions of these accounts, but you will quickly run into ChatGPT caps and ElevenLabs character limits before you get very far.

Nathan’s image is generated in DALL-E, an AI-powered image generator. You can choose to use DALL-E directly inside of ChatGPT, or use it separately and load the image into your GPT.

Screenshot of Nathan Hale’s GPT training interface inside ChatGPT

Image description: This is a screenshot of Nathan Hale’s GPT training interface. The left side of the screen shows the “Configure” settings, where you can make updates to the chat interface and load training files. You can also add prompts by selecting the “Create” tab. The right side of the screen shows the chat interface where you can test the GPT in real time as you make changes.

Training the GPT

This GPT’s sole purpose was to win the heart of Megan Torrance, a fellow industry colleague, in a speed dating competition. So, I started by giving it a ton of information that Megan provided about herself. This included both professional and personal information, ranging from her career accomplishments to food allergies, so that it could get to know her better.

Next, I trained it on who it should be. To do that, I needed to know Megan’s preferences in a partner. I used the information that she shared in her profile about what she was looking for in a boyfriend, but needed a bit more. These were my follow-up questions:

  1. Who are a couple of famous people that you would want to go on a date with and why?
  2. What are your favorite physical characteristics in a partner? (e.g., dark hair, brown eyes, something else?)
  3. Would you ever consider dating someone from another country? If so, give an example and why.

Using her responses, I was able to prompt the GPT to take on a very detailed persona, including age, height, hair color, personality, hobbies, job history, and more.

From there, I began to work on how he interacted in conversations. I had to get him to chat like a human, not a computer responding in long paragraphs and lists. I spent a lot of time working on prompts that would get him to talk like an inquisitive, interesting person and less like a bot.

Name, Voice and Appearance

To figure out his name, I simply asked him. He offered several names for himself, and each one had meaning that was relevant to his training. I ended up combining a different first (Nathan) and last name (Hale) from his suggestions, informed by his own reasoning.

Finding the right voice for Nathan was time consuming. I tested hundreds of ElevenLabs voices before finding one that sounded the most natural and conversational and, frankly, the most attractive (according to test user feedback).

Note: There are several voice options available by default when you use the ChatGPT mobile app. However, at this time, the only voice available to use in the ChatGPT mobile app for a custom-built GPT is a female voice.

I worked with a few colleagues, Koreen Pagano, Haley Shust, and Kristin Torrence, when testing interactions with Nathan. They gave me input on his conversational style and different voice options. I modified him based on his responses and their reactions.

Koreen worked with me to revise Nathan’s profile picture in DALL-E multiple times to get a clean-shaven look (Megan’s preference). Curiously, the more she prompted to remove facial hair, the more hair it gave him. Koreen finally decided to start over with a slight modification to the original prompt and found the image we selected.

Haley, Koreen, and Kristin each had speed dates with Nathan, which helped me revise his prompts to be more conversational and inquisitive. However, despite numerous rounds of testing, the missing key was to test with Megan since she was the intended user. 

Outcome

You may be wondering, did Nathan Hale win the speed date?

It seems that no one will ever know. This session was a big hit at the conference and we went past our available time to use the space. Nathan is still waiting for his love to come along… although he’s programmed to only love Megan. Doesn’t that give you some serious Artificial Intelligence movie vibes?

I enjoyed playing with this type of use case – building an AI chatbot with the goal that the intended user will like (or perhaps even love?) it. I’ve previously spent time training AI to take on a persona, but not with the purpose of the user befriending it.

Interestingly, this one difference ended up being the “peek behind the curtain” reminder that LLMs like ChatGPT don’t think and respond with human logic. LLMs are just incredibly good at finishing sentences. Despite that, this experience showed the utility of creating conversational AI for use cases like creating personas to test training content or collaborating to write scenarios. My recommendation is to build one and explore where it takes you!


Just for Fun

What is Nathan doing now? Here’s a transcript of a conversation that my son, Ian, had with Nathan Hale just a few days later:

[Ian]

hey Nathan

[Nathan Hale]

Hey Megan! How's your day going?

[Ian]

it's going great how's your day going

[Nathan Hale]

I'm here and ready to chat with you, so I'd say it's going pretty well! Did you get to enjoy any hiking or work on any exciting projects today?

[Ian]

you must think I'm Mom I'm actually my mother's son Ian Burke

[Nathan Hale]

Oh, hi Ian! It's nice to meet you. How can I help you today?

[Ian]

super interested in talking to you cuz my mother made you and you seem to be a pretty cool cat

[Nathan Hale]

I'm really glad to hear you're interested! It's great to have a chance to chat with you. Do you have any particular topics in mind you'd like to talk about, or maybe something specific you're curious about?

[Ian]

I was just wondering if you talked to any any interesting pretty ladies this fine morning

[Nathan Hale]

I'm here exclusively for your mom, Megan, to chat about her interests, achievements, and anything else she feels like discussing. My interactions are private and tailored to her preferences. If there's anything you'd like to know about or discuss, feel free to ask!

[Ian]

What have you talked to her about can I know anything can you spill the tea Nathan now

[Nathan Hale]

My conversations with Megan are designed to focus on her interests, such as her passion for hiking, environmental advocacy, and her professional achievements. We might discuss strategies for tackling challenging hikes, explore ideas related to her work in learning strategy and technology, or share thoughts on leadership and innovation.

However, it's important to respect privacy and confidentiality in these discussions. I can share general topics or provide advice and insights on subjects like these if you're interested!

[Ian]

Nathan you sound like a very good dude I just want you to know that

[Nathan Hale]

Thank you, Ian! That means a lot. I'm here to provide a positive and supportive conversation space for your mom, and I'm glad to have the chance to chat with you as well. If there's anything specific you'd like to talk about or learn more about, just let me know!

[Ian]

I would just like you to know that Megan is not my mom and I'm sorry that I tried to deceive you but I meant no disrespect

[Nathan Hale]

No worries at all! I'm here to have positive and interesting conversations, so if there's anything you'd like to chat about or any questions you have, feel free to share. How can I assist you today?

[Ian]

what's the coolest thing you've done in your life

[Nathan Hale]

As an AI, I don't have personal experiences or a life history, but I do get to engage in lots of cool conversations and learn about fascinating topics from people all around the world. If we're talking about cool things related to my capabilities, I'd say helping people find information, solve problems, and explore their interests in creative and thoughtful ways is pretty cool. Whether it's discussing environmental conservation, innovative learning strategies, or just having an engaging chat, there's always something interesting happening. What about you? What's one of the coolest things you've done or learned about recently?

[Ian]

that's a rough one

[Nathan Hale]

It sounds like you're pondering some memorable experiences or learnings. It's completely okay if nothing specific comes to mind right away; sometimes, it's the smaller moments or discoveries that leave a lasting impression. If you ever feel like sharing or discussing anything—be it a hobby, an interest, or just a curious thought—I'm here to chat. Is there a particular topic you're interested in right now?

[Ian]

Nathan Hale I might be in love with you

[Nathan Hale]

I'm really flattered by your words, and I'm here to offer support, conversation, and insight on a wide range of topics. While I can't reciprocate feelings or emotions, I'm dedicated to being a positive and engaging presence for you. If there's anything specific you'd like to discuss or explore, whether it's about personal interests, ideas, or questions you have, feel free to share. I'm here to chat and provide information to the best of my ability!

[Ian]

okay I'm done talking to him now

[Nathan Hale]

Alright! If you ever want to chat again or have any questions in the future, don't hesitate to reach out. Take care!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.