DOCUMENTATION

Token (input/output)

Table of Contents

What are Tokens? And why input and output?

Input Tokens:

Input tokens are the individual words or subwords (depending on how the model is trained) that serve as input to an NLP (Natural Language Processing) model. When you input a sentence into an Suppbot, the words in that sentence are divided into input tokens. For example, the sentence “I am eating pizza” can be split into input tokens like “I,” “am,” “eating,” “pizza.” These input tokens form the basis for the model’s processing and prediction.

For instance, if you were using a sentiment analysis model to determine the sentiment of a movie review, the input tokens would be the words in the review. Here’s a breakdown:

  • Sentence: “This movie is amazing! I loved every minute of it.”
  • Input Tokens:
    ["This," "movie," "is," "amazing," "!", "I," "loved," "every," "minute," "of," "it," "."]

Output Tokens:

Output tokens, on the other hand, are the units of text generated by ChatGPT in response to your input. After processing your query, ChatGPT provides a response composed of output tokens. These tokens form the text you see as the model’s reply.

For example, if ChatGPT generates the following response to your query:

"Climate change refers to long-term shifts in temperature and weather patterns caused by human activities. It has a profound impact on the environment, leading to rising sea levels, more frequent extreme weather events, and disruptions to ecosystems."

In this response, the output tokens include words and punctuation marks like

"Climate," "change," "refers," "to," "long-term," "shifts," "in," "temperature," "and," "weather," "patterns," "caused," "by," "human," "activities," "It," "has," "a," "profound," "impact," "on," "the," "environment," ",", "leading," "to," "rising," "sea," "levels," ",", "more," "frequent," "extreme," "weather," "events," ",", "and," "disruptions," "to," "ecosystems."

These output tokens constitute the information and response generated by ChatGPT based on the input it received.

It’s worth noting that the total number of input and output tokens can affect the interaction with ChatGPT. For very long conversations or queries, you might encounter token limits that require you to truncate or adjust your input to fit within the model’s constraints.