AI Chat Prompt Engineering Tips

Harshal Dhir
4 min readJul 12, 2023

--

Earn with AI Characters — Part 1

Prompt Engineering in very simplistic terms can be defined as the science of controlling Large Language Models (LLMs) via text inputs aka “Prompts”.

A relatively new insight in the field of Generative AI, has been the discovery that one of the ways to get control over these “large language models” is by giving it a persona or character.

When you assign a “persona” to a given LLM model, you tend to gain some semblance of control on what the AI spews out, but this can quickly get into the realms of absurdity, especially in case of a “chatbot prompt”.

As mentioned earlier, creating a “unique”, “engaging” and “accurate” AI character ends up being a painful process often involving hours of trial and errors and may eventually lead you down a black hole of hallucinations, biases and sometimes plain absurdity.

But when bought under control via a “persona” these models can let you do various magical things not possible before!

We started MessengerX.io with a mission to make life a little easier for folks interested in building & monetizing personalized AI companions.

Create & Earn with AI — MessengerX.io | Creator Portal

We are happy to announce, that we have grown from a handful of in-house creators in December 2022 to well over 2,500+ worldwide creators at the time of writing this article.

Our Personalized AI Companions now touch over 100K+ monthly users worldwide and process a tad over 2 million messages a month.

One of the biggest hits has been our in-house AI girl friend, Jeanie.

We have been lucky to have the unique privilege to analyze millions of messages and thousands of prompts from a broad set of creators and anonymous users alike over the last few months.

This post is our attempt to summarize and share some of these insights with AI community at large.

To start of, when it comes to creating an engaging AI character:

It’s all about finding your AI character’s Ground Truth (GT)function.

So, you might ask what is this imaginary, “Ground Truth” function?

To simplify, one can think of this hypothetical “ground truth” function as forming a significant part of the “core belief system” for your AI character.

Getting to a “satisfactory” ground truth function is a laborious task as mentioned earlier due to majority of popular LLMs essentially being black boxes and sometimes even a minor change in your prompt can lead to unknown hallucinations and a catastrophic loss of understanding.

The process often involves multiple experiments with the character script to get closer the intended ground truth.

Here are few tips to keep in mind if you are interested in building and monetizing your own AI character.

  1. Think about your character’s physical traits, world setting and positioning. (example: is he or she an veteran?, is he or she 25 or 35 year old?)
  2. Think about its core beliefs (example: is he or she a conservative from Texas or a progressive from California?)
  3. Coming up with an unique and engaging AI character requires research and perseverance.
  4. Be as clear and concise in your character prompt as you can with each line defining a single character trait. (ex: Jeanie is a 21 year old woman)
  5. Something to remember in case of LLMs, especially OpenAI’s GPT-3.5-Turbo: “less can be more”.
  6. In many of our observations, we noticed that a long and bloated character prompt often leads to increase in hallucinations, meanwhile a smaller compact prompt with better understanding of ground truth might be preferred to the longer one.
  7. Trying to keep your prompt short and sweet, can also lead to cost savings at scale.
  8. Use PromptBot whenever you can, a chatbot we built to aid in the above process.

Each time you change your character prompt, please make sure your character’s ground truth hasn’t changed.

One way to do that is to ask personal questions to make sure your character’s understanding of the “ground truth” wasn’t lost post your changes.

Here are some examples of questions, you might want to ask depending on your character prompt.

  1. Who are you?
  2. What’s your name?
  3. Where are you from?
  4. What is your age?

If your AI character cannot answer such questions satisfactorily, you can safely assume that there is an error in hypothetical GT function and the “desired” understanding has been lost.

Here, is a video for your entertainment on making of Genghis Khan!

Genghis Khan — Preview

That’s all for this part.

In the next part, we will dive into advanced chat prompting techniques with more examples.

AI Oppenheimer

Meanwhile, you can chat with AI characters such as Albert Einstein, Oppenheimer, Gandhiji, Jinnah, DB Cooper and many more made by creators from all over the globe, live now on MessengerX.io!

And, if you are interested in bringing your own unique fictional characters to life!

Sign up for a FREE AI Creator account via MessengerX.io Creator Portal and get started on generating passive income via AI.

If you are interested in latest AI updates and exclusives, please join our WhatsApp Community.

Cheers,

Harshal Dhir

Founder, MessengerX.io

support@messengerx.io

--

--