
28 February, 2024
| Assistant | Provider | Privacy | LLM | Capabilities | Pricing model |
|---|---|---|---|---|---|
| ChatGPT | OpenAI | 👎🏼 | GPT-3.5, GPT-4 | Web search, DALLE, GPTs, multimodal input | 💶 |
| Copilot | Microsoft | 👍🏼 | GPT-3.5, GPT-4 | Web search, DALLE, multimodal input | 🆓 for BFH employees and students |
| Gemini | 👎🏼 | Gemini Ultra, Gemini Pro, and Gemini Nano | Web search, multimodal input | 💶 | |
| HuggingChat | 🤗 Hugging Face | 👍🏼 | Various open models, e.g. CodeLlama, Llama 2, Mistral, Gemma | 🆓 |



\[ P(w_{w+1} | w_1, w_2, ..., w_t) \]
Generated text is dependent on the context.
Every token is given an equal amount time (computation per token is constant).
LLMs operate with tokens, not words. These are sub-words, and make working with text much easier for the model. A rule of thumb is that one token generally corresponds to ~4 characters of English text. This translates to roughly \(\frac{3}{4}\) of a word (so 100 tokens is about 75 words).
Feel free to try out the OpenAI tokenizer.

In this 2-dimensional representation, concepts that are “related” lie close together. Read about embeddings in this tutorial.
A foundation model, or large language model (LLM):
: What is the capital of France?
: What is the capital of Germany? What is the capital of Italy? . ..
Figure courtesy of Andrej Karpathy
Figure courtesy of Andrej Karpathy
LLMs are thought to show emergent abilities - abilities not explicitly taught. Instead, they emerge as a result of text prediction.
Abilities include:
What kind of knowledge does an LLM have to have to be able to write a continuation of the following text?1
: How many holes does a straw have?
: A straw has one hole. It’s a cylindrical tunnel that runs through the entire length, creating a single continuous space from one end to the other.
: What about a tunnel?
: Similar to a straw, a tunnel can also be considered to have one hole. It’s an elongated pathway carved through an obstruction, allowing passage from one side to the other, thus creating a single continuous space or hole through the material.


Trained (fine-tuned) in two stages to have conversations: turn-taking, question answering, not being [rude/sexist/racist], etc.
Foundation model has learned to predict all kinds of text, including both desirable and undesirable text.
Fine-tuning is a process narrow down the space of all possible output to only desirable, human-like dialogue.
Model is aligned with the values of the fine-tuner.

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)

ask (retrieve) and tell (store) facts.
: What is the capital of Uzbekistan?
: Tashkent
It looks like the LLM knows the capital of Uzbekistan1.

E.g. physical reasoning
PROMPT : Write a haiku about a workshop on large language models.
ASSISTANT : Whispers of circuits,
Knowledge blooms in bytes and bits,
Model learns and fits.
OpenAI give a set of strategies for using their models effectively:
These include:
: You are an expert on learning techniques. Explain the concept of ‘flipped classroom’ in one paragraph.
: You are an expert financial derivatives. Explain the concept of ‘flipped classroom’ in one paragraph.
: You will be provided with a document delimited by triple quotes and a question. Your task is to provide a simplified answer to the question using only the provided document and to cite the passage(s) of the document used to answer the question. If the document does not contain the information needed to answer this question then simply write: “Insufficient information.” If an answer to the question is provided, it must be annotated with a citation. Use the following format for to cite relevant passages ({“citation”: …}). Cite only the relevant passage(s) of the document, not the entire document.
““” The flipped classroom intentionally shifts instruction to a learner-centered model, in which students are often initially introduced to new topics outside of school, freeing up classroom time for the exploration of topics in greater depth, creating meaningful learning opportunities. With a flipped classroom, ‘content delivery’ may take a variety of forms, often featuring video lessons prepared by the teacher or third parties, although online collaborative discussions, digital research, and text readings may alternatively be used. The ideal length for a video lesson is widely cited as eight to twelve minutes. ““”
Question: What is flipped classroom?
think step-by-step or Take a deep breath and work on this problem step-by-step (Yang et al. 2023).Instead of this:
: The odd numbers in this group add up to an even number: 4, 8, 9, 15, 12, 2, 1. Yes or no?
Do this:
: Is this statement correct? The odd numbers in this group add up to an even number: 4, 8, 9, 15, 12, 2, 1.
Reason through the problem step-by-step. Start by identifying the odd numbers. Next, add them up. Finally, determine if the sum is even or odd. Write down your reasoning steps in a numbered list.
: The odd numbers in this group add up to an even number: 4, 8, 9, 15, 12, 2, 1. Take a deep breath and think step-by-step.
: Improve this haiku:
Words weave through the air,
Minds meld with machine’s deep thought,
Knowledge blooms anew.
It is about about a workshop on large language models. I’m not happy with it.
Show me all the text. Format your edits as **TEXT** and show the deleted text as ~~TEXT~~. Keep you review short (max 100 words).
Try this example in ChatGPT.
For more advanced prompting techniques, see these websites:
and explore this activity.
Figure courtesy of Pinecone
Hardware requirements: