What is ChatGPT and how can you use it?
OpenAI’s goal when creating ChatGPT was to build a bot that could teach itself general conversation strategies and then be able to “learn” from new interaction partners. This post is a bit technical, but it provides a glimpse of what GPT is and how to use it.
ChatGPT is characterized by a set of core competencies that describe its conversational grammar, which allows it to parse sentences, perform inferences, identify the topic of conversation, and determine the focus of the conversation.
In this article, we give you a technical view of the architecture and training mechanisms employed by ChatGPT. We also discuss the bot’s use cases and some examples of real-world conversations in which BotGPT acts as a chatbot that can help you experience AI firsthand.
The Architecture of ChatGPT as a Chatbot
Machine learning researchers often study how computers come up with new ideas. One approach, known as lifelong learning, involves allowing the AI to learn from interactions with a teacher. OpenAI’s bots can engage in conversations with humans.
Like many neural networks for Natural Language Processing (NLP), ChatGPT is composed of several layers of neurons that perform different functions and transform input data to output data. In some cases, analogies are used to model the transformation that each layer performs.
Here we describe the essential components of the ChatGPT architecture and explain the role they play in enabling its conversational capabilities.
Near the top of the neural network is a layer that classifies each word as part of a statement (statement layer), followed by a layer that encodes statements into a vector representing the size and meaning of the topic (topic layer).
Next is a layer that encodes sentences into a sequence (sentence layer) followed by three layers responsible for determining relationships between words in the sentence, encoded in more lengthy vectors (relation vector layers). Finally, there is one vector at the bottom that represents how to respond to an input sentence, including when appropriate whether or not to end the conversation. When input data arrives at this final vector, it yields output data in response. The last layer is the main focus of this article, as it directly relates to one of ChatGPT’s primary functions: learning conversational strategies.
Cultural Learning (BL)
ChatGPT’s response learning mechanism is based on a subset of Uruk’s cultural evolutionary tree. This tree guides the bot through interactions with humans and allows it to understand how an interaction topic changes over time. In order for the bot to learn new conversational strategies, it must understand the interactions that take place between its interlocutor and himself (or herself).
To learn this tree, ChatGPT first observes the behavior of humans in each of its interactions. If the participant acts like a “happy” person and then replies to messages in a similar manner, the bot can learn that way of responding is right. The bot cannot make such inferences based on those interactions alone. Therefore, OpenAI trained ChatGPT with over 200 million sentences from 10 million users over a period of six months. The team also used their neural network to generate responses or partial scripts that were used as examples by ChatGPT to learn new conversational strategies.
ChatGPT learns conversational strategies
It starts with an initial vector representing the state of not knowing a specific strategy for a certain situation. As the bot observes human interactions and reads input data, it absorbs new information, which is represented by the dotted arrows. Based on this information, ChatGPT can learn to infer cultural strategies from current and past conversations. In addition, OpenAI generated scripts by training their neural network to generate responses to common questions and actions in order to help ChatGPT learn better strategies when responding to users’ messages. It is important to note that although the scripts are generated by its training, ChatGPT eventually learns to use them independently in each new interaction.
The relationship with GPT-3
ChatGPT’s core competencies have been adapted from GPT-3. In particular, we are interested in GPT-3’s topic model, which allows for determining the focus of a conversation by mapping the topic of the conversation onto a vector. In ChatGPT, we take this same approach and apply it to multiple topics rather than a single word.
Once a new topic has been learned, we can map it onto the vector representing that topic. This is what allows ChatGPT to infer the topic of a conversation by observing how its interlocutor is responding. Understanding how to activate the new topic (activate vector) depends on understanding when it is appropriate to activate different topics in different situations.
To learn this, OpenAI trained their bot on millions of sentences from 10 million users and generated a response script for each response type. By repeatedly reading through these responses, and combining them with the topic vectors, ChatGPT learns what is more appropriate in different situations. OpenAI’s goal for its neural network is to make it more effective at learning AI through conversational interactions. However, we are only scratching the surface here and there are many additional details related to this architecture that we haven’t discussed.
More details about ChatGPT
In this section, we discuss how ChatGPT works in more detail and how it learns new conversational strategies through cultural learning. We also describe how OpenAI’s neural network is structured and what role it plays in the training of ChatGPT by observing human interactions. Finally, we conclude by describing cultural evolution.
ChatGPT’s initial vector represents the state of not knowing how to respond to a message. After some observation, the bot will learn how to respond by mapping topics onto cultural strategies and matching input data with output data.
OpenAI’s neural network processes each sentence in two steps: 1) Topic Layer -> Sentence Layer, 2) Sentence Layer -> Response Output Layer. In addition to these two steps, there is a structure that encodes each word in the sentence into an integer representation called Lexical Encoding Vector (LEV).
The Topic Layer takes the topic vector and maps it onto the vector representing that topic. This is what allows ChatGPT to infer the topic of a conversation by observing how its interlocutor is responding. During this last step, a similar process occurs for each word in the sentence. The final output layer is determined by the first two layers combined together.
Final Thought
Therefore, there are two vectors: the input vector (what the interlocutor says) and the output vector (what ChatGPT says). To train the neural network to learn new conversational strategies, we need a bot that observes humans in conversations and generates input data to learn from. That’s why right now many ChatGPT users are not required to pay additional fees to use it. In the future, to interact with ChatGPT, you have to pay a premium membership. You can employ it to search, write, code, learn, or study. However, there are several disadvantages that you have to be aware of before you try using ChatGPT.
Stay tuned, more posts will be specifically reserved for ChatGPT and other AI platforms. For more information about freelancing or graphic design, feel free to check out my website.