CS I · Fri Oct 23 · 12.5 · We Do

Before the bell

You are responsible for all of this before the end of class.

  1. The discussion form in the I Do deck. All three sections. If you are here, this should be done.
  2. Your classwork. This form on the right. Section 1 before the exit ticket pops up; Section 2 past the floor.
  3. No Bench Basics today — this is a short or catch-up day.
  4. The exit ticket. It opens 15 minutes before the bell and lives on the last slide of this deck.
Classwork

Sign out of Google when you finish on a shared computer, so the next student can sign in as themselves. Google then shows a "Redirect notice" page. Click the muggsofcompsci.net/cs1 link on it to come back.

Seven Components, in Order

This reading lists the components of a web tool that answers questions with a language model, in the order the work passes through them.

The Seven Components

A person opens the tool's page, types a question and reads the answer on the same page. Between the question and the answer, the work passes through seven components, in this order. The interface is the page in the browser, where a person types a question and reads the answer. The request is the message that the browser sends to the server, and it carries the person's question. The server receives the request, adds the system prompt and sends the work on to the model. The system prompt is the set of instructions that the tool's builder writes ahead of time, and it joins the request just before the model. The model has two parts, its parameters and its runtime: the parameters are a large file of numbers, and the runtime is the program that uses them to predict the answer. The hardware is the memory that holds the parameters and the GPU that does the calculations. The response is the answer, which travels back from the model through the server to the interface.

What a Specification Is

A specification is a written description of each component: what it is, what it receives, what it does and what it sends on. This is the idea behind spec-driven development, where the specification is the part of the work that lasts and the code is built from it. Using the seven names above, in the same order, lets every specification be read the same way.

Sources: MDN Web Docs, Client-server overview (2026); Mistral AI, Prompting (n.d.); Hugging Face, Optimizing LLMs for Speed and Memory (n.d.); ggml-org, llama.cpp (n.d.); MuggsAI request path, class site source code (2026).

Seven Components, in Order, Whether They Like It or Not

This entry lists the components of a web tool that answers questions with a language model, in the order the work passes through them.

The Seven Components

A person opens the tool's page, types a question and reads the answer on the same page. From the outside, that is the whole story. Between the question and the answer, the work actually passes through seven components, in this order. The interface is the page in the browser, where a person types a question and reads the answer. The request is the message that the browser sends to the server, and it carries the person's question, sealed and hopeful. The server receives the request, adds the system prompt and sends the work on to the model. The system prompt is the set of instructions that the tool's builder writes ahead of time, and it joins the request just before the model, like a chaperone. The model has two parts, its parameters and its runtime: the parameters are a large file of numbers, and the runtime is the program that uses them to predict the answer. The hardware is the memory that holds the parameters and the GPU that does the calculations, which it does without complaint. The response is the answer, which travels back from the model through the server to the interface.

What a Specification Is

A specification is a written description of each component: what it is, what it receives, what it does and what it sends on. This is the idea behind spec-driven development, where the specification is the part of the work that lasts and the code is built from it. Code comes and goes; the spec stays. Using the seven names above, in the same order, lets every specification be read the same way, which saves a great deal of confused squinting.

Sources: MDN Web Docs, Client-server overview (2026); Mistral AI, Prompting (n.d.); Hugging Face, Optimizing LLMs for Speed and Memory (n.d.); ggml-org, llama.cpp (n.d.); MuggsAI request path, class site source code (2026).

The Parts of an AI Tool

This section follows one question from a web page to an answer and names each part that the question passes through.

Following One Question

An AI tool that a person reaches through a web page is built from several parts that pass work along in order. The example is the Name That Element page of MuggsAI. On that page, a student describes something on a screen, such as a box that pops up over a game, and the tool replies with the name of that element.

First, the student types the description into a box on the page and presses a button. The browser then sends a request to the class site's server. A request is a message that names a server and the resource it asks for, and it can carry data such as the text from a form. Next, the class site's server adds its own instructions to the student's text and sends a second request to Mistral's server, which runs the model. The model has two parts: a large file of numbers called parameters and a smaller program called a runtime. To run, the parameters are loaded into memory, usually the memory on a GPU, and the runtime uses them to predict the answer one token at a time. Finally, the answer travels back as a response, from Mistral's server to the class site's server and then to the browser, which shows it on the page. Figure 1 shows the parts of this chain in order, with the two servers drawn as one box.

The Interface

The interface is the part of a tool that a person sees and touches, which for a web tool is the page in the browser. On the Name That Element page, the interface includes the typing box, the button and the area where the answer appears. MDN describes a user interface as anything that helps a person use a machine, and it lists a web page and an input form as examples. For example, a student who changes the color of the button has changed the interface. The server is part of the tool and not part of the interface. A student never sees the class site's server or Mistral's server, even though both do work on every question. Several MuggsAI pages send their requests to the same server and the same model, and each page still has its own interface.

The System Prompt

A system prompt is a set of instructions that the builder of a tool writes ahead of time and sends to the model with every request. Mistral's documentation describes the system message as an optional message that sets the behavior and context of the assistant. It also says that the system prompt is typically managed by the developer of the tool. In MuggsAI, the server places a system message in front of the student's text each time it sends that text to the model. The Name That Element system prompt tells the model to give names from the class Elements Catalog and not to write code.

What the user types is a prompt, not the system prompt. The student's text travels in a separate message, and that message has the role "user" in the request. The user usually never sees the system prompt, although some tools show it. MuggsOfPrompts, for example, shows its system prompt on the page as read-only text. Because the system prompt shapes how the model responds, two tools that use the same model can behave differently.

Components and the Specification

A component is one part of a system that has one job and can be named and replaced. The interface is a component, because its job is to collect the question and show the answer. The server is a component, because its job is to receive the request, add the system prompt and pass the work along. The model is a component whose job is to predict the answer, and the memory and GPU are the hardware it needs to do that. "The AI" is not one component. It is made of at least four: the interface, the server, the system prompt and the model.

Each component can be changed without rebuilding the others. For example, a builder can rewrite the system prompt and leave the interface and the server unchanged. A specification for a tool describes each component: what it is, what it receives and what it sends on.

Summary

A question typed into a web tool passes through an interface, a request, a server, a system prompt, a model running in memory on a GPU, and a response. Each of these is a component with one job. A specification for a tool names each component and describes its job.

Sources: MDN Web Docs, Client-server overview (2026); MDN Web Docs, UI (2025); Mistral AI, Chat completions and Prompting (n.d.); Hugging Face, Optimizing LLMs for Speed and Memory (n.d.); ggml-org, llama.cpp (n.d.); MuggsAI and MuggsOfPrompts request paths, class site source code (2026).

The Parts of an AI Tool, Itemized

This entry follows one question from a web page to an answer and names every part the question passes through on the way, of which there are more than you would think.

Following One Question

An AI tool that a person reaches through a web page is built from several parts that pass work along in order, like a bucket brigade that never gets tired. The example is the Name That Element page of MuggsAI. On that page, a student describes something on a screen, such as a box that pops up over a game, and the tool replies with the name of that element.

First, the student types the description into a box on the page and presses a button. The browser then sends a request to the class site's server. A request is a message that names a server and the resource it asks for, and it can carry data such as the text from a form. Next, the class site's server adds its own instructions to the student's text and sends a second request to Mistral's server, which runs the model. The model has two parts: a large file of numbers called parameters and a smaller program called a runtime. To run, the parameters are loaded into memory, usually the memory on a GPU, and the runtime uses them to predict the answer one token at a time. Finally, the answer travels back as a response, from Mistral's server to the class site's server and then to the browser, which shows it on the page as if nothing much had happened. Figure 1 shows the parts of this chain in order, with the two servers drawn as one box to save everyone some ink.

The Interface

The interface is the part of a tool that a person sees and touches, which for a web tool is the page in the browser. It is the only part most people ever meet. On the Name That Element page, the interface includes the typing box, the button and the area where the answer appears. MDN describes a user interface as anything that helps a person use a machine, and it lists a web page and an input form as examples. For example, a student who changes the color of the button has changed the interface, and nothing else. The server is part of the tool and not part of the interface. A student never sees the class site's server or Mistral's server, even though both do work on every question, quietly, like stagehands. Several MuggsAI pages send their requests to the same server and the same model, and each page still has its own interface.

The System Prompt

A system prompt is a set of instructions that the builder of a tool writes ahead of time and sends to the model with every request. Think of it as a note pinned to the model's shirt before it goes out. Mistral's documentation describes the system message as an optional message that sets the behavior and context of the assistant. It also says that the system prompt is typically managed by the developer of the tool. In MuggsAI, the server places a system message in front of the student's text each time it sends that text to the model. The Name That Element system prompt tells the model to give names from the class Elements Catalog and not to write code.

What the user types is a prompt, not the system prompt. The student's text travels in a separate message, and that message has the role "user" in the request. The user usually never sees the system prompt, although some tools show it. MuggsOfPrompts, for example, shows its system prompt on the page as read-only text, which is unusually honest of it. Because the system prompt shapes how the model responds, two tools that use the same model can behave like two different creatures.

Components and the Specification

A component is one part of a system that has one job and can be named and replaced. The interface is a component, because its job is to collect the question and show the answer. The server is a component, because its job is to receive the request, add the system prompt and pass the work along. The model is a component whose job is to predict the answer, and the memory and GPU are the hardware it needs to do that. "The AI" is not one component, however much it would like to be. It is made of at least four: the interface, the server, the system prompt and the model.

Each component can be changed without rebuilding the others, which is a great comfort to anyone who has to fix one. For example, a builder can rewrite the system prompt and leave the interface and the server alone. A specification for a tool describes each component: what it is, what it receives and what it sends on.

Summary

A question typed into a web tool passes through an interface, a request, a server, a system prompt, a model running in memory on a GPU, and a response. Each of these is a component with one job. A specification for a tool names each component and describes its job, so that nobody has to guess.

Sources: MDN Web Docs, Client-server overview (2026); MDN Web Docs, UI (2025); Mistral AI, Chat completions and Prompting (n.d.); Hugging Face, Optimizing LLMs for Speed and Memory (n.d.); ggml-org, llama.cpp (n.d.); MuggsAI and MuggsOfPrompts request paths, class site source code (2026).

What's in the Chunk?

In 12.2, we split AI answers into two kinds. Generation is the model singing from its squeezed patterns, and retrieval is the tool going out to fetch real documents and then generating an answer from them.

Google's AI Mode uses both. When you upload a photo and ask about it, Google says Lens identifies each object in the image, and a custom version of Gemini makes sense of the whole scene. Then AI Mode runs several searches about the image and writes you an answer with links. Lens reads the image, Search retrieves the pages, and Gemini generates the answer.

Because the tool is fast and seems to know everything, it's easy to think of it as superior to doing the research yourself. That word is the misconception. The model is fast and broad, but it isn't complete, and that's true of every cloud model, including Claude.

Start with the generation side. The chunk the model trained on is very large, but it isn't "everything," and some of it comes from business deals. In 2024, Google announced that it could use Reddit's content through Reddit's Data API, including to train on it. You can't look up a full list of what went into the chunk, so you can't check what's in there.

Now the retrieval side. A search can reach pages on the open web, plus whatever the company has licensed for the tool. Paywalled journals, university databases and most library collections sit behind logins the AI doesn't have. Old Times-Picayune pages are one example. The New Orleans Public Library offers the paper's archive back to 1837, and your way in is a library card.

That leaves three walls you can't see.

The first is a silent gap in retrieval. When a search-backed tool can't open a source, nothing makes it tell you. It can answer from whatever was open, and that answer sounds just as complete.

The second is a gap in training. Google lets website owners name Google-Extended in their robots.txt file, the file that tells crawlers what to skip, to keep their pages out of training for future Gemini models. So the chunk is shaped partly by who said yes and who said no.

The third is policy that looks like knowledge. A refusal or a vague answer can come from a legal or company rule rather than missing information. If a chatbot has ever turned down your request for the full lyrics to a new song, you've seen this wall.

When the AI can't reach the source, you're left taking its word for it. And as the song ladder showed, its word sounds equally confident either way.

Answer the questions in Section 3 of your classwork.

Sources: Google, Bringing multimodal search to AI Mode (2025); Google, An expanded partnership with Reddit (2024); Google Search Central, Google's common crawlers (Google-Extended); New Orleans Public Library / NOLA City Archives, Databases.

Classwork · Section 1 — Reading 2

Sign out of Google when you finish on a shared computer, so the next student can sign in as themselves. Google then shows a "Redirect notice" page. Click the muggsofcompsci.net/cs1 link on it to come back.

MC 1. (Component 1 · name) Reading 2 names the first component in a web tool's parts list. Which part is first in the order?

  • The interface
  • The request

MC 2. (Component 1 · job) Reading 2 describes the interface as the page in the browser. Which job does it do?

  • It receives the request and adds the system prompt
  • It is where a person types a question and reads the answer

MC 3. (Component 2 · what it carries) Reading 2 says the request is a message that the browser sends to the server. What does it carry?

  • The person's question
  • The parameters of the model

MC 4. (Component 3 · job) Reading 2 lists three jobs for the server. Which job sends work on toward the model?

  • Receiving the request from the browser
  • Adding the system prompt and sending the work on

MC 5. (Component 4 · who writes it) Reading 2 says the system prompt is a set of instructions. Who writes it?

  • The builder of the tool, ahead of time
  • The person using the tool, at the moment of the question

MC 6. (Component 4 · where it joins) Reading 2 says the system prompt joins the request before one specific component. Which one?

  • The server
  • The model

MC 7. (Component 5 · two parts) Reading 2 says the model has two parts. Which two parts does it name?

  • Parameters and runtime
  • Parameters and system prompt

MC 8. (Component 6 · hardware) Reading 2 names the hardware as two pieces. Which pair does it name?

  • A hard drive and a CPU
  • The memory that holds the parameters and the GPU that does the calculations

MC 9. (Component 7 · direction) Reading 2 says the response is the answer. Which path does it travel?

  • From the model through the server to the interface
  • From the interface through the server to the model

MC 10. (Order check) Reading 2 lists the seven components in order. Which pair is in the correct order from earlier to later?

  • Response, request
  • Request, server

CR 1. (What a specification is) Reading 2 says a specification is a written description of each component. Name the four things Reading 2 says a specification describes about a component.

Write your answer in your lab notebook, labeled CR 1.

CR 2. (System prompt vs prompt) Reading 2 treats the system prompt as its own component, separate from the person's question. Explain in two sentences why keeping them separate matters when writing the specification.

Write your answer in your lab notebook, labeled CR 2.

Figure 1. The seven parts between a question typed on a web page and the answer that appears, numbered in the order the work passes through them.Figure 1. The seven parts between a question typed on a web page and the answer that appears, numbered in the order the work passes through them, whether or not anyone notices.

The big picture so far (newest on top)

Big picture 3 of 5. Generation and retrieval. In Google's AI Mode, Lens reads the image, Search fetches pages from the open web (retrieval), and Gemini writes the answer from its squeezed chunk (generation), with links back to the pages.
Big picture 2 of 5. The song ladder. On each rung the gaps get bigger and less is really known, but the model sings every rung in the same confident voice. On rung 4 a word gets "picked anyway," which people call a hallucination.
Big picture 1 of 5 (from 12.2). Training squeezes one chunk of the internet into a much smaller parameters file and loses details; probability fills the gaps when the model is used.
Classwork · Section 2 — Past the floor

Sign out of Google when you finish on a shared computer, so the next student can sign in as themselves. Google then shows a "Redirect notice" page. Click the muggsofcompsci.net/cs1 link on it to come back.

CR 3. (Parts list for a tool you use) Pick one web tool you have used this unit, such as MuggsOfPrompts, MuggsAI's Name That Element, or a chatbot you have opened on your own. Write its seven components in order, using the names from Reading 2. For each one, add a short phrase saying what that component is for this tool.

Write your answer in your lab notebook, labeled CR 3.

CR 4. (The one you understand least) Look at the parts list you wrote in CR 3. Which component do you understand least, and what question about it do you want answered? Mr. Muggivan reads these.

Write your answer in your lab notebook, labeled CR 4.

CR 5. How would you know if an AI tool could not reach a source it needed? Explain what you could check, using one idea from the extra reading.

Write your answer in your lab notebook, labeled CR 5.

CR 6. If an AI answer cannot show you its source, how much should you trust it? Take a position and explain your reasoning with one idea from the extra reading.

Write your answer in your lab notebook, labeled CR 6.

Bench Basics

No bench today

There is no bench on this day. Finish your classwork and move to the exit ticket.

No bench today — the bench pop-up is off for this day.

Classwork

Sign out of Google when you finish on a shared computer, so the next student can sign in as themselves. Google then shows a "Redirect notice" page. Click the muggsofcompsci.net/cs1 link on it to come back.

Exit Ticket

This opens during your class period.