1786 lecture3 Sep22 26
Overview
Jonathan Rose connects ECE 1786's word-embedding assignment to large language models: both train neural networks with cross-entropy and backpropagation, but LLMs predict the next token from long sequences and generate text through an autoregressive loop. He argues that scale helped this approach generalize to higher-level concepts, then applies the idea to agentic systems, where LLMs work with software through a harness, and to prompt engineering, where small example sets and held-out testing can validate behavior without training new model parameters.
Key takeaways
- An LLM's core training objective is next-token prediction: it processes a sequence of token embeddings and learns a probability distribution over the vocabulary.
- Text generation is autoregressive: every generated token is fed back into the model, so a long response requires repeated inference on a large network.
- Rose attributes LLM capability gains to scaling data, parameters, and compute, citing GPT-3's 175 billion parameters and training corpora reaching trillions of tokens.
- Agentic applications combine LLMs with conventional software; a harness detects tool requests, executes tools, and can engineer context using expert knowledge.
- Prompt development should start with explicit output criteria, use general instructions, and test iteratively on examples while preserving a held-out test set.
- Rose argues that many applications should try prompting a capable existing model before fine-tuning, while validating that outputs meet the task's requirements.
Chapters
- Jonathan Rose warns that using AI to complete Assignment One can bypass the intended learning, even if syntax assistance is acceptable.
- Assignment Two is being moved earlier as Rose restructures the course around its project.
- Project partners must submit a matching form, with only one partner required to fill it out.
- Assignment One, Part Three trained a model to predict context words associated with a target word.
- The two-dimensional embeddings were expected to group related words such as he, she, and I, or dog and cat.
- Rose uses this familiar training task as the bridge to explain large language models.
- The model receives a two-dimensional embedding rather than a raw word or one-hot input.
- Its output is a probability distribution over the vocabulary, which had about nine words in the assignment example.
- Cross-entropy loss and backpropagation train the model to favor the correct associated word.
- Rose identifies two main differences from the assignment model: many token embeddings enter the network, and the target is the next token rather than an associated word.
- Training examples come from ordinary text: use the first word to predict the second, then the first two words to predict the third.
- A vocabulary of roughly 50,000 tokens was a common scale, though vocabularies have grown.
- The model outputs probabilities for possible next tokens, rather than directly writing a complete response.
- A simple decoding strategy selects the highest-probability token, though Rose notes that this is not the full practical story.
- Each generated token is appended to the input so the model can predict again.
- The autoregressive loop repeatedly feeds each output token back into the model as new input.
- A response of many words therefore requires many inference passes through a large model, contributing to energy and compute costs.
- A special stop token can signal when generation should end.
- Rose attributes LLM progress to larger training corpora, more model parameters, and much greater computing power.
- He contrasts Assignment One's small network with GPT-3, which had 175 billion parameters.
- Training scaled from hundreds of billions of tokens toward trillions.
- Rose recounts AJ Agrawal asking OpenAI researcher Ilya Sutskever how OpenAI would use Microsoft's $1 billion investment.
- Sutskever's reported bet was that bigger models, more data, and more compute would produce stronger capabilities.
- Rose says GPT-2 and GPT-3 showed striking behavior in his research before ChatGPT's public release in November 2022.
- Rose asks what knowledge a system needs to predict words across software, philosophy, surgery, and mathematics.
- In a dental-surgery example, the next phrase after a passage about deformity and malocclusion was “temporomandibular joint derangements.”
- The example illustrates why next-token prediction can require specialized knowledge, not just everyday autocomplete.
- A counterargument is that an LLM may only reproduce statistical word distributions without understanding concepts.
- Rose argues that models generalize across varied expressions and connect higher-level concepts, citing a hockey-safety product prompt that led GPT-3 to propose sensors.
- He describes LLMs as “concept machines,” while acknowledging that empirical research is needed to test the claim.
- A base model trained only to predict the next token may produce incoherent or unsuitable responses.
- A later training stage teaches models to answer questions in ways people prefer and adds restrictions against harmful assistance.
- Rose highlights the tension between following user requests and refusing requests such as instructions for building a weapon.
- Rose compares an LLM running on a computer to the computer's role as a general-purpose engine.
- He asks students to imagine LLMs embedded in applications, much as computers now control separate systems in cars.
- The course project emphasizes creative applications, and students must get permission before training a model.
- A difficult task can be decomposed into smaller jobs handled by multiple LLMs or software components.
- Agentic systems can combine language models with optimizers, spreadsheets, and other conventional programs.
- Rose distinguishes tasks suited to flexible language reasoning from computation or optimization that regular software handles more reliably.
- An LLM can emit a specially formatted token or request indicating that it wants to call a tool.
- A surrounding program must detect the request, execute the tool, and return its result to the model.
- Rose calls this orchestration software the harness, and notes that it can contain engineering knowledge beyond the model's output.
- Parametric knowledge is stored in the model's trained weights; contextual knowledge comes from the current input.
- A harness can construct and revise the model's context at each inference step, an approach Rose calls context engineering.
- His smoking-cessation therapy chatbot uses expert knowledge in its harness because the model alone does not reliably apply the therapy.
- Prompt engineering means writing commands that make an LLM perform a task consistently, not merely asking a one-off question.
- Rose distinguishes conversational question answering from processing data supplied alongside a written instruction.
- For example, GPT-4o rewrote “I really hate the way you teach” as a more polite request for fewer pauses.
- Rose describes two approaches: build a prompt from task requirements or ask an LLM to help draft one.
- A vague prompt forces the model to make assumptions, so users should inspect those assumptions and confirm they match the task.
- He cautions that outsourcing every step to AI can weaken a person's ability to learn and act independently.
- Assignment Three uses a CNN to classify sentences as subjective or objective, but an LLM can also return labels such as “sub” and “obj.”
- Rose's mental-health research uses reflective listening: restate a distressed person's meaning to show attention and encourage them to continue.
- A carefully engineered therapy prompt asks for a short, creative reflection about underlying emotions or values and discourages repetitive openings.
- First define the output criteria, then convert them into a draft prompt.
- Iterate on one example and then a second, keeping instructions general rather than referring to specific words in the data.
- Test on small batches, such as five examples, then evaluate a held-out set of 20 examples for accuracy and task fit.
- Rose says his research group generally uses state-of-the-art models and prompt engineering instead of parametric training.
- He argues that prompt iteration may need around 30 examples rather than the hundreds or thousands often used for model training.
- Assignment Two will practice prompt development and validation; project reports must explain how the system was tested.
Transcript excerpt
0:03 Good morning everyone. Welcome to ECE 1786 lecture number three. Question for you. You all look like you're waking up just like me. How did assignment one go? How did it go for you? >> Going fine. >> Going fine. Okay. >> Yeah. Oh, so you are finished. Okay, good. Yeah, it It was a lot of work like I warned you. What was the hardest part for assignment one? Oh, that's
0:51 that's painful. Yeah, you didn't realize you have to produce text. Every assignment you produce text and pop it in so you make it easier. So, what was the hardest part for you? >> AI was >> Yeah. Yeah. I guess that's hard. Did Did you learn more or is that a silly thing to do to make for me to make you do my brain? I don't It's only one. >> Yeah. So, you said you don't think you'll do it in the future. Yeah. I don't think many of us will. My worry was that by using the AI you would it would figure out everything for you. The syntax I don't care about. Right. It was it's the understanding. Yeah, Michael. >> So I I cheated.
1:40 Um but you're right. It very much did exactly what you said. >> Yeah. It's just going to run ahead and give you the answer. [laughter] >> Not looking. >> Yeah. Yeah. So uh it we will be looking for evidence that you cheated. uh uh I know you're taking the course not for credit but uh uh I want to encourage you to learn not to let let it to do do your thinking for you. I mean it's the subject of this course. So uh and remember I'm going to let you do it on on both sides. Uh when we get to the
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, Jonathan Rose.