UUtah CS 6340 NLP | Fall 2026 | Intro to prompting
Overview
The lecture explains how prompting lets users apply pretrained language models without changing their weights, introducing zero-shot prompting, few-shot prompting or in-context learning, and chain-of-thought prompting. It then connects these techniques to ChatGPT-style instruction following, which became more reliable through supervised instruction fine-tuning on human-written responses using next-token prediction.
Key takeaways
- Prompting lets users request task-specific outputs from a pretrained model without changing its weights, avoiding the engineering and GPU requirements of fine-tuning.
- A zero-shot prompt supplies an instruction and an unsolved instance, while few-shot prompting adds answered demonstrations as context rather than training examples that update weights.
- Exact output requirements, such as requesting a CSV file, plus style constraints and persona guidance can make prompts more useful and predictable.
- Chain-of-thought prompting requests reasoning before an answer and can be applied in zero-shot or few-shot settings.
- Agentic systems extend reasoning into an observation, reasoning, action loop, where generated actions are executed and the resulting observations inform later steps.
- Supervised instruction fine-tuning pairs instructions with human-authored responses and trains with next-token prediction and negative log likelihood to improve instruction following.
Chapters
- Pretraining produces a powerful next-token text completer, while task-specific fine-tuning changes model weights.
- Fine-tuning can be an access barrier for users such as lawyers and clinicians who lack model weights, coding experience, or GPU resources.
- GPT-3 Playground, released in 2020, made it possible to prompt a model directly, but early GPT-3 often followed instructions poorly.
- Prompt engineering emerged as iterative prompt design, including task instructions and persona cues such as asking the model to act as an impartial judge.
- Useful prompt components include a directive, optional task examples, a precise output format such as CSV, style constraints, and a persona.
- Zero-shot prompting combines an instruction with an unsolved task instance, such as answering a question from a reading passage.
- Few-shot prompting, also called in-context learning, provides demonstrations with answers before a new unsolved instance, all within one input string.
- In-context demonstrations do not update model weights; extensive pretraining and post-training data also make literal zero-shot and few-shot claims difficult to verify.
- Chain-of-thought prompting asks for reasoning or justification before an answer and can be used with either zero-shot or few-shot prompts.
- Long reasoning chains also support agentic workflows that alternate between environmental observations, reasoning, and generated actions.
- Instruction fine-tuning, also called supervised fine-tuning, trains a pretrained model on many instruction and human-authored response pairs.
- Training maximizes the likelihood of human responses through standard negative log likelihood and next-token prediction, with data formatted for conversational exchanges.
Transcript excerpt
0:00 This is a really little bit dissected lecture today. We had a quiz and then we had evaluation and now we are jumping into a completely new topic. But this new topic is actually bringing us back to kind of where we left things off before the full break. Before full break I have introduced very key components of LLMs and we learned about pre-training and I said okay you can fine-tune the model but that does not make an LLM of you know of a kind of like ChatGPT right? There are missing ingredients. And what we are going to do for the next few weeks is basically learn about all of the remaining ingredients that make an LLM a like ChatGPT in 2023, something you can
0:51 actually use and interact on a chat interface. And then I will also sprinkle in new advances which are to use how these LLMs can generate actions that can be executed, for example on a computer or virtual machine and actually click things and and so on right? So we are going to try to understand how everything that's going on in 2026 is possible to the best extent possible relative to my capabilities and and my knowledge. Okay so let me start here. So so here is a just that visualization schematic that had many times that shows that okay you pre-train a model and now it's basically like a really powerful
1:40 auto-complete right? You can just you know complete text. It's good at language modeling. And that model we could then fine-tune change the weights for a specific task like a specific classification task for example. However this second part is a bottleneck for a of users. So, you can imagine a lay person or the main expert, like a
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, UofU Data Science.