Apply for the next session


This seems like a good thing to know.

Just gathering some ways to break this down – to think about and flesh out laters.

Well, first you take “Artificial” – aand then you add “Intelegence” – and done!

Just kidding.



When you interact with a chatbot, you’re essentially having a conversation with a computer program designed to simulate human-like responses. It goes through several sophisticated steps to understand and respond to your inputs. Here’s a step-by-step breakdown of what happens under the hood:

  1. Step 1: Sending input

    Input… (explain how that gets sent first)

    When you type a message or question into the chat interface, the chatbot receives your text as input. This is the starting point for processing your request.

    This input text is the raw data that the chatbot needs to process.

  2. Step 2: Tokenization

    The chatbot examines the text to understand and interpret what you are asking. This involves breaking down your input into manageable pieces. The bot might look for specific keywords or phrases that help it determine the intent of your message.

    The chatbot breaks down the input text into smaller units called tokens. Tokens can be words, phrases, or even punctuation. This process is similar to segmenting a sentence into its components to understand each piece’s function.

  3. Step 3: Parsing and Intent Recognition

    After tokenization, the bot uses natural language processing (NLP) techniques to analyze the structure of the sentence and identify the intent behind your message. This step involves understanding what action you expect the bot to take, whether it’s answering a question, booking a ticket, or something else.

    If the chatbot is designed with advanced capabilities, it tries to understand the context of the conversation. This can mean recalling earlier parts of the conversation or using external information that affects the response.

  4. Step 4: Entity Recognition

    Alongside parsing the intent, the bot looks for entities—key pieces of information relevant to your request. For example, if you ask, “What’s the weather like in New York tomorrow?”, “New York” and “tomorrow” are entities that the bot identifies and uses to provide a correct response.

  5. Step 5: Generating Embeddings

    The tokens are converted into numerical forms known as embeddings. These embeddings are high-dimensional vectors that represent the tokens in a way that captures their meaning and linguistic relationships. This conversion is crucial for the model to process the natural language data mathematically.

  6. Step 6: Generating a Response

    Once the bot understands your request and the context, it generates a response. This step often involves selecting a pre-written message that matches the intent of your input. More advanced chatbots, like those using AI models, dynamically generate responses using complex algorithms that predict what a human might say in a similar situation.

    Using the identified intent and entities, the chatbot accesses a trained model to generate an appropriate response. This model uses the embeddings and performs complex calculations, often involving deep learning algorithms, to predict and assemble a coherent answer based on the context of the conversation.

  7. Step 5: Output Delivery

    The chatbot sends the generated response back to the user interface, where it appears as a message. The speed of this process is crucial for maintaining a flow that feels natural, akin to chatting with a human.

    The generated response is then converted back into human-readable text and sent to you. This step must be fast to ensure the conversation feels as natural and seamless as possible.

  8. Step 6: Learning from Interaction

    Some chatbots have the ability to learn from interactions to improve future responses. This involves analyzing what questions were asked and how effectively the bot handled the conversation.

    Advanced chatbots have mechanisms to learn from each interaction. By analyzing which responses satisfy user inquiries and which do not, they can improve over time, making their answers more accurate and contextually appropriate.

Real example


  1. Step 1: Sending input

    “What’s the best school for someone who wants to learn how to design and build web applications?”

  2. Step 2: Tokenization

    Tokenization of the sentence “What’s the best school for someone who wants to learn how to design and build web applications?” could indeed look like that if a simple word-based tokenizer is used. However, in more sophisticated models like those used in large language models, tokenization might be a bit more complex. These models often use a type of tokenization called subword tokenization, which can break down words into smaller pieces based on common prefixes, suffixes, and stems found in the training data.

    “What”, “‘s”, “the”, “best”, “school”, “for”, “someone”, “who”, “wants”, “to”, “learn”, “how”, “to”, “design”, “and”, “build”, “web”, “applica”, “tions”, “?”

    In subword tokenization, words like “applications” might be split into “applica” and “tions” to better handle unknown words and improve model efficiency by sharing common subwords across different words. This method helps in dealing with a variety of words without having to have a direct match for every possible word in the training data, thereby making the model more flexible and capable of understanding and generating more nuanced text.

  3. Step 3: Parsing and Intent Recognition

    From these tokens, the chatbot’s NLP engine will work to determine the intent of the query. The presence of words like “best”, “school”, and “learn” are key indicators that the user is inquiring about educational resources.

  4. Step 4: Entity Recognition

    Education Subject: “design and build web applications” — This phrase is recognized as the specific field of study the user is interested in.

    Question Type: Implicit in “What’s the best” — Indicates that the user is looking for a recommendation.

  5. Step 5: Generating Embeddings

    Each of these tokens and recognized entities would be converted into numerical vectors, known as embeddings. These embeddings help the model understand the semantic and contextual relationships between the words in the query.

  6. Step 6: Generating a Response

    Using the intent (“seeking educational resources”) and the entities identified (“web design and development”), the chatbot would then consult its training data or linked databases to generate a response that suggests educational institutions known for their web development programs.

    This process involves complex AI models that predict the most appropriate and helpful answer based on the context of the entire conversation and what it has learned from previous similar interactions.

    This explanation gives a glimpse into how seemingly straightforward questions are deconstructed into components that a machine can understand and respond to meaningfully, leveraging the intricacies of NLP and AI.

  7. Step 5: Output Delivery

    The chatbot sends the generated response back to the user interface, where it appears as a message. The speed of this process is crucial for maintaining a flow that feels natural, akin to chatting with a human. (but it doesn’t feel that way… it’s usually wayyy too fast to feel like that).

    The generated response is then converted back into human-readable text and sent to you. This step must be fast to ensure the conversation feels as natural and seamless as possible.

  8. Step 6: Learning from Interaction

    Scenario: Suppose the chatbot initially recommends a few top-ranked design schools but doesn’t specifically address programs focused on web applications.

    User Feedback: The user might follow up by specifying that they are looking for programs specifically strong in web development, not just general design.

    Learning Process:

    1. Data Collection: The chatbot logs this interaction, noting that the user specified a need for web development programs after receiving a more general response.
    2. Analysis: Over multiple similar interactions, the chatbot’s underlying machine learning model identifies a pattern where users frequently follow up general school recommendations with requests for specific program details.
    3. Model Adjustment: The developers might use this insight to retrain or adjust the chatbot’s response algorithms. They could implement changes where the chatbot now recognizes when users are likely looking for specialized programs. The chatbot might then prioritize responses that include information about specialized courses or certifications related to web development.
    4. Improved Responses: After this adjustment, when a new user asks a similar question about schools for learning web design, the chatbot is more likely to immediately include information about the specific programs in web development, perhaps even highlighting unique strengths or partnerships with tech companies.

Isn’t that what search engines do?

Both chatbots and search engines utilize tokenization and other natural language processing techniques, but their implementations and the technologies they use to serve their purposes differ significantly. Here’s a simple breakdown of the key differences in how they work:


  • Tokenization and Understanding: Chatbots tokenize input to understand the user’s intent and context. They focus on understanding and responding to each input within the flow of a conversation. The model needs to maintain context over multiple interactions.
  • Response Mechanism: Chatbots directly generate a text-based response that aims to satisfy the user’s current query. This involves dynamically creating sentences that might not have been explicitly programmed.
  • Interactivity: They are designed to mimic human conversation, making them more interactive. They respond in real-time, providing immediate answers and engaging the user in a dialogue.

Search Engines

  • Tokenization and Indexing: Search engines also tokenize input, but they use these tokens to search an index they’ve created of all the web pages they have crawled. This indexing process is vast and involves storing and categorizing millions of web pages based on their content.
  • Ranking and Retrieval: Search engines retrieve relevant documents based on the search query and then rank these documents according to relevance using various algorithms (like Google’s PageRank). The results are presented as a list of links, rather than direct answers.
  • Scope and Scale: Search engines are built to handle and categorize the entire internet’s content. They must manage and efficiently search through much larger datasets than chatbots.

While both systems use tokenization, chatbots use it to maintain a conversation and generate relevant responses within that conversation. In contrast, search engines use tokenization as a part of their indexing and retrieval process, focusing on finding and ranking external content in response to queries. Their underlying architectures and purposes guide these differences in implementation.

Is a chatbot like GPT really AI?

(We asked ChatGPT)

Yes, a chatbot like GPT (Generative Pre-trained Transformer) is considered a form of artificial intelligence, specifically under the subset of AI known as machine learning. Here’s a breakdown of how GPT fits into the concept of AI:

What is AI?

Artificial intelligence broadly refers to systems or machines that mimic human intelligence to perform tasks and can iteratively improve themselves based on the information they collect. AI includes a variety of techniques and technologies, including rule-based systems, machine learning, and deep learning.

How GPT Fits as AI

  • Machine Learning: GPT is based on machine learning models, particularly a type of neural network called the transformer. These models are trained on vast amounts of text data and learn to predict the next word in a sentence given the words that came before. This learning process is a hallmark of AI.
  • Natural Language Processing (NLP): GPT uses advanced NLP techniques. NLP is a domain of AI that deals with the interaction between computers and humans through natural language. The ability of GPT to understand, generate, and respond in human language at a high level of proficiency is a result of AI-driven NLP.
  • Adaptive Learning: While GPT models are primarily pre-trained, they are also fine-tuned and can sometimes be adapted to specific tasks and datasets. This adaptability is another characteristic of AI, where a system can improve or tailor its behavior based on additional data.
  • Autonomous Decision Making: In generating text, GPT autonomously decides what words to use based on its training and the input it receives. This decision-making process, where the model generates coherent and contextually appropriate responses, demonstrates AI capabilities.

AI Characteristics

GPT exhibits several key characteristics of AI:

  • Understanding and generating natural language: GPT can comprehend and produce text that is often indistinguishable from text written by humans.
  • Learning from data: The model’s performance is contingent upon the data it was trained on, learning patterns, and nuances in language.
  • Handling a broad range of tasks: From writing and summarizing to answering questions and more, GPT’s versatility in handling diverse language-based tasks showcases the broad applicability of AI.

In summary, GPT is considered AI because it leverages machine learning, natural language processing, and adaptive learning techniques to perform complex tasks autonomously, learning from its interactions and data to improve over time.

Are all of these responses and words and guesses based on scraping all the content that humans wrote on the internet?

Not exactly. While the term “scraping” might imply a direct lifting or copying of content, the training process for models like GPT (Generative Pre-trained Transformer) is more complex and involves several layers of abstraction.

Here’s a clearer breakdown:

Data Collection

GPT and similar AI models are typically trained on a diverse dataset collected from a variety of sources on the internet. These sources might include books, websites, articles, and other forms of text. The goal is to expose the model to a wide range of language uses and styles.

Training Process

  • Pre-training: During this phase, the model learns the structure of language and how words typically fit together. This involves understanding grammar, syntax, and some level of semantics without any specific task in mind. The model learns by predicting parts of sentences given other parts, a process known as unsupervised learning, because it does not require labeled data specifying correct answers.
  • Fine-tuning: After pre-training, the model can be fine-tuned on more specialized tasks such as answering questions, translating languages, or even writing in a particular style. This usually involves supervised learning, where the model is given specific tasks and shown the correct answers.

How the AI Generates Text

  • Not Simple Replication: When generating text, the AI doesn’t simply replicate the exact phrases or sentences it was trained on. Instead, it generates predictions based on the patterns and relationships it learned during training. This process is guided by the input it receives and the context established during the interaction.
  • Statistical Learning: The model uses statistical methods to predict the next word in a sequence, making it seem like it understands the query when it’s actually calculating probabilities based on its training.

Ethical and Legal Considerations

To address ethical and legal concerns, data used for training these models is typically obtained and managed in a way that respects copyright and user privacy. The developers and companies behind these AI models are responsible for ensuring they adhere to relevant laws and guidelines, which can vary by country or region.

In summary, while GPT and similar models do learn from the vast amount of text available on the internet, the process is not a simple scrape-and-reuse but a sophisticated training regimen that involves learning the underlying patterns and structures of language.

If you watch these....

Take some notes – and help us put them in the most meaningful order, OK!

This is really more about the application than how it works

What tasks can we get the computer to do – that we don’t want to do (and that doesn’t provide the value).

Apply for the next session