Skip to main content

๐ŸŸข Chatbots

HelloHi, How are you?Well, what is 5*5?I think it is25

  • How chatbots work
  • Why chatbots are better than non-chatbots

In the realm of artificial intelligence, there are various types of LLMs that serve different purposes. One of the most commonly used models in this course is ChatGPT, a chatbot that remembers previous messages, so that you can have a conversation with it. However, chatbots are not the only type of LLM. Another example is GPT-3, an earlier AI developed by OpenAI, which unlike chatbots, has no memory. Both GPT-3 and ChatGPT can perform basic tasks such as answering questions and generating summaries.

How Chatbots Workโ€‹

Chatbots like ChatGPT are designed to simulate interactive conversations. In order to have a conversation, chatbots must remember the entire conversation history. What this means for AIs like ChatGPT is that every time you send them a new message, they read all previous messages that you both sent at the same time, since they don't have a true memory. This 'memory' of conversation is the only important factor that distinguishes them from non-chatbots.


GPT-3 is a complete type of model, rather than chata. Here is an example that shows you how it differs from ChatGPT:



What is 2+

GPT-3 output


2+2 = 4

ChatGPT output

It seems like you didn't complete your question. If you meant to ask "What is 2 + 2?" then the answer is 4. If you have a different question or need further assistance, feel free to ask!

We can see that GPT-3 has completed our input with what it felt were the most probable next characters. On the other hand, ChatGPT has responded to us as if we suddenly stopped speaking in a conversation. The conversationality of chatbots makes using them feel more natural to use, so most people prefer them over other AIs. However, the most signifigant reason that chatbots are better is that companies like OpenAI and Anthropic have built chatbots that are very smart, and can better respond to your promptsb.


Gen AI like ChatGPT don't read words in the same way that we do. While we would read the sentence "I don't like eggs" word by word, they might break it into their own version of words, and read it like this: I, don, 't like egg s. These "words" are called tokens, and they are used in nearly every modern Gen AI. Each token is then converted into a list of numbers, so the AI can process it. You don't need to know why Gen AIs use tokens, but they are important to understand when considering pricing and context length.

Context Lengthโ€‹

Context lengthl refers to the amount of text that a language model can consider when generating a response. For both chatbots and non-chatbots, there is a maximum limit to the context length they can handlec. If the conversation or text exceeds this limit, the model will not be able to remember the entire conversation when generating a response. This is why it is sometimes necessary to restate important information or re-prime the chatbot.

750 words is approximately 1,000 tokensd. ChatGPT can remember 4K tokens, while more advanced versions of ChatGPT can remember up to 16K tokens. GPT-4 can process up to 32K tokens, and Anthropic's AI, Claude, can handle up to 100K tokens. Deciding which model to use is sometimes a trade off between pricing and the need for longer context lengths. ChatGPT will be sufficient for this course.

  1. There are other types of non-chatbots, which we will see in the next lesson.โ†ฉ
  2. Sometimes non-chatbots are preferable if you want more concise outputs that complete your text. We will learn about how to access GPT-3 in the next lesson.โ†ฉ
  3. Context length is sometime called context size, or the length of the context window.โ†ฉ
  4. State of the art research may change this in the future.โ†ฉ
  5. According toโ†ฉ