character.ai Guide

#introduction

What is character.ai?

character.ai is a "neural language model chatbot service." That is a mouthfull! To keep things simple, character.ai is a chatbot that has been taught how to write messages like a human. It was developed by ex-Google programmers in 2022. character.ai was taught how to write by analzying countless messages written by people around the world. Unlike the famous ChatGPT, character.ai specializes in messaging. You can send messages to it just like you would message a friend on LINE or Discord. character.ai is able to understand the context of your message and use outside information to make life-like responses. Because of these features, character.ai has become very popular with its iOS and Android apps hitting over 1.7 million downloads in 2023 alone.

Why Use character.ai in the English classroom?

One of the biggest challenges of learning English in a non-English-speaking country is the lack of opportunity to communicate with native English speakers. character.ai allows students to use English in the form of instant messaging at any time for free. character.ai is also one of the most advanced models out there. It really feels like you are talking to a real person. character.ai also supports other languages such as Japanese, Spanish, and French.

What Makes character.ai Special?

The coolest part about character.ai is that you can train it to talk like your favorite celebrity, fictional character, or even yourself. Could you imagine talking to Harry Potter about your day at work or school? character.ai makes that possible! Today we will be learning how to do this.

#getting-started

Quick Overview

Our objective is to create a character.ai model that writes messages similar to a person or character of our choice. Here is a general flow of how this works:

  1. Choose a character and find their dialogue online.
  2. Format the dialogue so that character.ai can study it easily.
  3. Create a character.ai account.
  4. Create a new model in character.ai.
  5. Adjust the model settings and insert your chosen dialogue from step #1.
  6. Test the model and give the model feedback.

What You Will Need

Luckily there are not many things that you need for this project and character.ai is quite capable. That said, we will need to make an account with Kaggle, an online database as well as character.ai. Although character.ai has a mobile app for iOS and Android, I highly suggest working with your model on a computer. The mobile app is convenient for talking to your model as well as rating its responses but it is not very good for inputting your training dialogue.

In addition, when working with dialogue for a model, it is best to use plain text. You want to avoid using word processors like Microsoft Word as it adds formatting to your text of which can complicate things. I highly recommend downloading Notepad++ for this reason. It is open source and free to use!

Download Notepad++

#dialogue-setup

Get Dialogue from Kaggle

To get things started, we need to find dialogue of the character we want to chat with! Of course you could copy all the dialogue from a book or watch a movie and write it all down. But those methods take up a copius amount of time. Luckily, a lot of this dialogue is already available to us online via sites like Kaggle.

  1. Go to kaggle.com and make an account
  2. In the search, type in the character name and add "dialogue." For example: south park dialogue.
  3. Select one of the datasets that come up and download it. Most datasets come in .csv format. These files can be opened with Microsoft Excel.
  4. Open the .csv file and take a look.

Formatting the Dialogue

This is where a little bit of elbow work comes in. Dialogue is important but it is useless if character.ai cannot read it well. This is why we need to format the dialogue correctly. Datasets from Kaggle are written in all different ways, but the most common probably looks something like this:

						Kaguya: Kaichou, why are you so mean?
						Miyuki: Uh... Ar.. No, I didn't mean it that way!
						Kaguya: Then, what did you mean?
						Miyuki: Ar... How do I put it...
					

While this looks pretty good to human eyes, the chatbot model does not know who "Kaguya" nor "Miyuki" are. In reality, it does not matter who they are, but we need to make it clear who we want the chatbot model to mimic and allow it to differentiate between different characters. If we want the chatbot to mimic "Kaguya," this is what we need to do:

						{{char}}: Kaichou, why are you so mean?
						Miyuki: Uh... Ar.. No, I didn't mean it that way!
						{{char}}: Then, what did you mean?
						Miyuki: Ar... How do I put it...
					
  • Here, the {{char}} label tells the chatbot model that this is who they are supposed to be. The rest of the characters in the dialogue do not matter.
  • There is also the {{user}} label. If we replace "Miyuki" with the user label, the chatbot model will assume that the person messaging the chatbot is Miyuki and will respond accordingly. In all honesty, you can likely just ignore this label unless you want to get into roleplay.
  • You should remove all quotation marks. The semicolon is required, however.
  • The more dialogue you can provide, the better. character.ai now supports up to 32,000 characters' worth of dialogue.
  • Be selective in terms of what dialogue you want the chatbot model to learn from. Use dialogue that expresses a clear discussion between characters. This will result in more authentic responses when you use the chatbot.
  • A list of examples is provided in the character.ai settings page.

That is really it! I suggest getting your dialogue snippets into Notepad++ and using the "replace" tool to replace your chosen character with the {{char}} label.

#model-settings

Setting Up Your Model

Now that the boring work is complete, we can actually create the chatbot model! Let us get started:

  1. Go to character.ai and create an account.
  2. After that, click on the create button on the left side then click create a character.
  3. Go ahead and fill out the basic information for your chatbot. For the purposes of this guide, you can leave the image generation option unchecked.
  4. I highly suggest setting the Visibility to Private. Later on, when you are ready to share your chatbot, you can change this setting.
  5. Once you finish, click on edit details (advanced) at the bottom of the page.

At the bottom of the settings page, you will see a section with a big text box labeled Definition. This is where you will paste all your dialogue that you formatted earlier. Once everything is in there, hit Save and then open up your chatbot!

#giving-feedback

Giving Your Chatbot Feedback

Congrats! You can now start messaging your chatbot! That said, your work is not yet complete. Just because the chatbot model studied all the dialogue you just crammed down its throat does not mean that it perfectly knows how to talk like the character you chose. You need to refine the chatbot by giving it feedback! Thanks to character.ai's UI, this is very straight forward:

  1. When the chatbot responds to your message, an arrow will appear on the right side of the message with stars appearing at the bottom.
  2. Clicking on the arrow will generate a new response. You can do this a couple of times. You can scroll back to a previously generated response with the arrow that will appear on the left side of the message.
  3. If you click the stars, it will pull up a rating menu. You can rate the message from 1-4 stars. In addition, a feeback menu will pop up. You can then select one of the feedback options. I suggest clicking on Tell us more and choosing from that list.
  4. In my experience, generating around 4 responses and rating each one gets the best results for training the chatbot.

The Importance of Feedback

Without feedback, your chatbot will be prone to strange responses or falling out of character. The process of using your chatbot and giving it ample feedback on responses allows the chatbot to learn, and thus become more like the character you want it to be. This process takes the longest and it is completely up to you how far and long you want to go with it.

One thing! I highly suggest downloading and using the iOS or Android character.ai app. That way, you could pretty much chat with your chatbot while laying in bed. Giving feedback becomes as easy as swiping left or right on messages and tapping feedback.

#last-notes

The End!

Congrats! You now know how to use character.ai to create a chatbot that mimics one of your favorite characters. I hope that this guide has given you decent understanding about how the basics work. AI and deep learning are very complex topics and I am no expert. If you have any questions or suggestions, please reach out to me by email or on Discord/Revolt!

If you are a language teacher, this is a great way to not only give students access to foreign language practice 24/7, projects like these can be very motivating. Students can spend time crafting a chatbot experience to their liking. Instead of scripted and dry model conversations from textbooks, they can talk to their favorite movie or anime characters in English!

Thanks to character.ai, anyone can get a hands on experience working with AI. In the past, we used pre-trained models such as DialoGPT which required much more manual training and knowledge of Python. Even then, the responses could get strange. character.ai is truly a masterpiece that continues to get better with time. If you have the extra funds, please consider their paid subscription to support the devs!

#translate-page

#contact