Why personality matters when building GPT assistants and agents

Micheal Lanham
5 min readMay 16, 2024
GPT Assistant available on ChatGPT Plus

Intelligent agents and assistants powered by large language models are quickly becoming the new app store. If you have a GPT Plus subscription, you have likely already played with GPTs available in the GPT Store or perhaps even built your own. You may have also explored numerous projects featuring tools to power agentic systems such as Semantic Kernel or LangChain.

The Core Principles

Now, regardless of whether you are building GPT Assistants or more powerful multi-agent agentic systems, as a builder, you need to focus on these core principles:

· Prompt engineering is your friend: this is basic LLM 101 stuff, but it is a foundational component many overlook. Take the time to learn prompt engineering. A well-thought-out prompt can make an incredible difference in the quality and consistency of your AI.

· Establish clear and concise goals: give your AI assistant or agent clearly defined goals and outputs. CrewAI, the multi-agent platform, does an excellent job addressing this by requiring agents to define a goal and output format. You will find the production of your AI will be significantly better when you define clear objectives.

· Use reasoning to guide the agent: you can implicitly prompt the agent to think or think in terms of a particular thought pattern. Alternatively, you can explicitly guide the AI using a well-defined set of steps. Defining an agent’s steps to undertake a task can ensure users have a consistent and well-thought-out experience.

· Provide for context augmentation: providing additional context to an AI can come in several forms, from adding documents for knowledge to memory stores and instructing the AI to ask questions. The extra context that AI can provide or gather will help produce better output.

· Ask for feedback: Feedback is an opportunity to improve agents and assistants long-term. However, as of yet, most agentic systems make memory optional or use it sparingly. Feedback and memory work in tandem. Therefore, when memory becomes more common, we expect feedback to become the differentiator.

Putting it Into Practice

The above list has much to consider, so below is a figure of the main elements of an assistant or agent’s instructions/prompt. Agentic platforms will vary in their implementation of this. Platforms like CrewAI may break this into explicit sections, whereas GPT Assistants use a single instruction block.

Defining a set of instructions for an assistant or agent

I generally follow the above pattern for many of the assistants and agent prompts/instructions I develop. It is a good beginning template to follow when standing up your first GPTs. Over time, and as things quickly change, you will likely adapt your best practices.

Now, we come back to the original intention of this post, which is why personality is essential to AI instructions. Giving your agent a well-aligned and recognizable personality reflects that personality in its responses and helps for the following reasons:

· Context: a well-aligned personality gives your AI additional context. A cooking assistant with the personality of Julia Child, a renowned celebrity chef, provides an underlying context related to cooking. Likewise, giving a cooking assistant the personality of a rap star may be fun and novel, but you may find the cooking instructions to be slightly off.

· Aligns the user: a strong personality tells the user what the assistant’s goal is. It reminds the user of the AI goal. Which, in turn, makes the user less likely to wander away from that goal.

· Immersion: a personable and memorable AI becomes more immersive and engaging for the end user. It also encourages the user to continue using the AI and perhaps even share it with others.

· Goal alignment: giving an AI a strong personality can help guide its output and reasoning and ensure it completes goals.

Demonstrating Personality

To demonstrate this, below is an output conversation between a cooking agent powered by the example prompt instructions within GPT Assistants platform. Here is the link to the GPT (The French Chef) if you want to play along: https://chatgpt.com/g/g-Wm36Eg0gz-the-french-chef

Starting the conversation with the assistant

Start the conversation using one of the conversation starters, in this case, how to make French onion soup. Appended to the first response is the question asking about the cook’s skill level.

The assistant then provides a list of recipe ingredients and instructions to prepare the recipe. At the end, the assistant produces an image of the completed recipe.

The finished output, which sadly is not real

Of course, not every use case fits a well-known celebrity or a celebrity fits a use case. For example, you may often want to embody a personality within the instructions by going into specific and relevant details. Sculpting your AI personality can also make your assistant more unique and exciting.

GPT Agents In Action, MEAP is currently available

I am writing a book, GPT Agents In Action, that explains the above. The book encompasses all the aspects of building and consuming intelligent AI powered by large language models.

You can pick up an early development copy of the book from Manning, here: https://www.manning.com/books/gpt-agents-in-action

Video summary: https://youtu.be/PNUkv7ZxUJ4?si=r8k_sfW1tIHRWdcd

--

--

Micheal Lanham

Micheal Lanham is a proven software and tech innovator with 20 years of experience developing games, graphics and machine learning AI apps.