Home » Business Topics » Data Strategist

Creating Healthy AI Utility Function: ChatGPT Example – Part II

  • Bill Schmarzo 
Slide8

In Part I of the series “Creating Healthy AI Utility Function: Importance of Diversity,” I talked about the importance of embracing conflict and diversity to create a Healthy AI Utility Function;  that is, creating an AI Utility Function that continuously balances conflicting KPIs and metrics to deliver responsible and ethical outcomes.

The AI Utility Function is a mathematical function that defines the goal or objective of an AI system. It is used to evaluate different actions or decisions that the AI system can take and choose the one that maximizes the expected utility or value of the outcome.

Incorporating the conflicting utility values of different stakeholders in the AI Utility Function is vital in constructing an AI model that can adapt and adjust to changing circumstances while still delivering meaningful, relevant, and responsible outcomes. The AI system must consider various stakeholders’ diverse interests and goals and constantly seek to balance and re-balance the trade-offs between these economic interests and goals as the AI model interacts with its operating environment.

Given the importance of the AI Utility Function in guiding meaningful, relevant, ethical AI outcomes, it would be interesting to understand the role the AI Utility Function plays with ChatGPT.  Yes, ChatGPT, like all AI models, uses an AI Utility Function to deliver responsible and ethical outcomes.

But first, let me see if I can simplify the description of how ChatGPT works which is a challenge I have when dealing with folks outside (and sometimes even within) the AI community.

How Does ChatGPT Work?

If I had to explain ChatGPT to my mother-in-law, I’d say that ChatGPT is a simple concept that does four things exceptionally well:

Level 101 (Mother-in-Law): How Does ChatGPT Work?

  1. Accesses and catalogs public content on the internet
  2. Parses user requests to understand user intent
  3. Matches the user request (intent) to the cataloged content
  4. Formats a human-like response in presenting the content

Yea, pretty simple. 

Now, if my brother-in-law were to wander into the room and wanted to understand how ChatGPT works, I’d expand on each of the four tasks mentioned above:

Level 201 (Brother-in-Law): How Does ChatGPT Work?

  1. ChatGPT accesses and catalogs publicly available parts of the internet in context to how the information is used and communicated. ChatGPT crawls the internet and collects vast amounts of information from various sources (e.g., websites, articles, blogs, digital books, and research papers) and then determines the context of that information. This information is stored in a Large Language model (LLM) – a “knowledge repository” containing information patterns gleaned from the contextual information upon which ChatGPT was trained.
  2. ChatGPT parses the user requests to determine user intent. ChatGPT uses natural language processing (NLP) to analyze and understand the user’s request, identifying keywords, phrases, and other contextual information that helps ChatGPT understand the user’s intent and what information they seek.
  3. ChatGPT matches the user’s request to the cataloged content.  Based on the user’s intent, ChatGPT searches its LLM to predict the most relevant content based on the user’s request. This involves weighing various factors, such as the user’s query, their query’s context, and the content’s relevance and quality.
  4. ChatGPT formats a human-like response to present the content to the user. ChatGPT generates a response relevant to the user request based on the patterns and information contained within the LLM.  ChatGPT presents the information in a human-like conversation, choosing the right words and phrasing to convey the information clearly and concisely (Figure 1).
Slide9

Figure 1: How Does ChatGPT Work?

Creating a Healthy ChatGPT AI Utility Function

ChatGPT, as a Large Language Model (LLM), is designed to optimize a utility function, which is the likelihood of generating coherent and meaningful text given a particular input. During training, the model learns to generate text that maximizes the probability of the target text given the input text (think of it as Google Search and Microsoft Word autocomplete on steroids). This optimization process involves adjusting the model’s parameters to minimize the difference between the generated and target text.

The AI Utility Function guides the behavior of ChatGPT, determining what responses the model generates based on the input it receives. The variables and metrics included in the AI utility function for ChatGPT depend on the specific task the model is being trained to perform. Some of the variables and metrics that are used in the ChatGPT AI Utility Function include:

  • Perplexity metrics assess how well the model can predict the next word given the preceding context. A lower perplexity indicates that the model is better at predicting the next word, generating more coherent and meaningful text.
  • Fluency metrics assess how well the generated text conforms to the rules of grammar and syntax. The AI utility function aims to generate fluent and grammatically correct text.
  • Coherence metrics assess how well the generated text relates to the input context. The AI utility function pursues to create coherent and semantically meaningful text given the input.
  • Diversity metrics assess how varied the generated text is. The AI utility function seeks to create diverse and interesting responses to keep the conversation engaging.
  • Relevance metrics assess how relevant the generated text is to the user’s query or input. The AI utility function aims to create relevant text for the user.
  • Emotion metrics assess effectiveness in generating emotional responses. The AI utility function can include metrics that aim to create reactions that convey a particular emotion, such as happiness, sadness, or anger.
  • Persuasion metrics assess the effectiveness of persuading users to take a particular action or adopt a certain perspective. The AI utility function can include metrics to generate effective and persuasive responses.
  • Factual accuracy metrics aim to create answers that are accurate and supported by evidence.
  • Personalization metrics aim to generate personalized and relevant responses to the user.
  • Trustworthiness metrics seek to assess verifiable responses based on credible sources.

These metrics could be incorporated into the ChatGPT AI Utility function (and maybe they already are) to guide ChatGPT to ensure that it generates effective, appropriate, and responsible responses.

Summary: How ChatGPT Came to Be

“What do you get when you 1) take a 2003 LLM paper, 2) add a dash of sentiment analysis from 2016, 3) transform with attention in 2017, and 4) stir in 2022 exponential computing and storage growth? GPT next word (or token) prediction models aren’t new. However, today’s scale is larger (and tomorrow’s scale will be even larger).”

This is how Jeff Frick summarized the development of ChatGPT in his LinkedIn post “Friday Five – Special OpenAI / ChatGPT Edition”:

  1. Take a 2003 LLM Paper – “A Neural Probabilistic Language Model
  2. Add a dash of 2016 Sentiment Analysis – “Learning to Generate Reviews and Discovering Sentiment.”
  3. Transform with Attention in 2017 – “Attention is all you need.”
  4. Stir in 2022 exponential computing and storage growth.

And Voila, you have ChatGPT (and the world loses its collective mind).

By the way, consider reviewing these three documents as your Level 301 homework assignment.  I expect book reports by the end of the semester!