What is ChatGPT?

Andrew Ellis

22 February, 2024

🏠 Take-home messages

  • Use LLMs yourself! It’s important to gain an intuition for their capabilities and limitations.
  • Combine domain knowledge of the “thing” you are working on, an understanding of how LLMs work, and an understanding of how to prompt them.
  • Use LLMs with students in a classroom setting. This will help students to develop their own understanding of LLMs and become AI-literate.
  • Always (critically 👩‍🔬) check an LLM’s output. They are language models, not knowledge bases. Keep a human in the loop.

🎯 Learning outcomes

After this workshop, you will be able to:

  1. Explain what large language models and conversational agents, such as ChatGPT, can be used for, and what they shouldn’t be used for.
  2. Create effective prompts for LLMs.
  3. Design your own LLM-based educational activities.
  4. Critically evaluate LLM-based educational activities.

⏱️ Schedule

Contents

  • Example: 20 questions
  • What is ChatGPT?
    • Base model
    • Assistant model
  • What is it not?
  • ChatGPT as a role-play simulator

20 questions

  • 🤷‍♂️ What is ChatGPT doing here?
  • How does this work?

What is ChatGPT?

  • Consists of a base model and an assistant model.
  • Base or foundation model: probabilistic model of how language is generated.
  • Assistant: able to create human-like dialogue.

Base model: text prediction

  • Extracts knowledge from text: linguistic, factual, commonsense, etc.

Base model

Produces text that most likely follows the input (prompt).

: What is the capital of France?

: What is the capital of Germany? What is the capital of Italy? …

: The first person to walk on the Moon was

: Neil Armstrong

Does an LLM know facts?

What we are really asking: Given what it learned during training, what words are most likely to follow “The first person to walk on the Moon was”? A good reply to this question is “Neil Armstrong”.

Base model: emergent properties

LLMs are thought to show emergent properties - abilities not explicitly programmed into the model, but emerge as a result of text prediction.

  • performing arithmetic, answering questions, summarizing text, translating, etc.
  • zero-shot learning: LLMs can perform tasks without being trained on them.
  • few-shot learning: LLMs can perform tasks with few examples.

Assistant model: alignment

- Trained to have conversations: turn-taking, question answering, not being [rude/sexist/racist], etc.

Chatbot

Prompt: System message: You are a helpful assistant. User message: Tell me a joke.

: Why don’t scientists trust atoms? Because they make up everything!

Prompt: System message: You are a helpful assistant. User message: Tell me a joke. Assistant message: Why don’t scientists trust atoms? Because they make up everything! User message: Tell me another one.

: Why did the scarecrow win an award? Because he was outstanding in his field! ::: –>

Knowledge base

  • A knowledge base is a collection of facts about the world.
  • Ask and Tell
  • I can ask but I can’t tell.
  • It cannot give me verifiable facts.

Knowledge base

Am Strande von Rainer Maria Rilke
👉 Open in ChatGPT

Kennst du dieses Gedicht?
👉 Open in ChatGPT

What can we learn from this?

Knowledge base

  • Can’t tell me where it got its information from.
  • LLMs are models of knowledge bases, but not knowledge bases themselves.
  • Expensive/difficult to update with new knowledge.
  • Produce ethically questionable results.

An LLM is a role-play simulator

We can think of an LLM as a non-deterministic simulator capable of role-playing an infinity of characters, or, to put it another way, capable of stochastically generating an infinity of simulacra (Shanahan, McDonell, and Reynolds 2023)

An LLM is a role-play simulator

  • An assistant is trained to respond to user prompts in a human-like way.
  • A simulator of possible human conversation.
  • Has no intentions. It is not an entity with its own goals.
  • Does not have a “personality” or “character” in the traditional sense. It can be thought of as a role-playing simulator.
  • Has no concept of “truth” or “lying”. The model is not trying to deceive the user, it is simply trying to respond in a human-like way.

An LLM is a role-play simulator

  • The dialogue agent will do its best to role-play a character in a dialogue.
  • At every step, the model is trying to generate text that is most likely to follow the input.
  • It can take many different paths. Your interaction is just one of those possible paths.

An LLM is a role-play simulator

  • You can open this conversation in ChatGPT.
  • Try re-generating the conversation after the initial prompt.

What are LLMs good at?

  • Fixing grammar, bad writing, etc.
  • Rephrasing
  • Analyze texts
  • Write computer code
  • Answer questions about a knowledge base
  • Translate languages
  • Creating structured output

References

Shanahan, Murray. 2023. “Talking About Large Language Models.” January 25, 2023. https://doi.org/10.48550/arXiv.2212.03551.
Shanahan, Murray, Kyle McDonell, and Laria Reynolds. 2023. “Role-Play with Large Language Models.” May 25, 2023. https://doi.org/10.48550/arXiv.2305.16367.
Wei, Jason, Yi Tay, Rishi Bommasani, Colin Raffel, Barret Zoph, Sebastian Borgeaud, Dani Yogatama, et al. 2022. “Emergent Abilities of Large Language Models.” October 26, 2022. https://doi.org/10.48550/arXiv.2206.07682.