Week 13 · 13.1 · Mon, Oct 26 · I Do reading
Input, Processing and Output
1 This section reviews what the class has learned about AI and then explains how a model is packaged into a tool that people can use.
What the Class Has Learned About AI
2 This semester, the class has spent a lot of time understanding AI. First, the class learned that a language model is two files: a large parameter file of numbers and a smaller program called a runtime. Next, the class learned that a model generates new text one token at a time and does not retrieve a stored answer. After that, the class learned that the models in this course run on a server, not on the Chromebook, because the class models need far more memory than a Chromebook has. Last week, the class listed the parts it takes to turn a model into a tool: an interface, a request, a server, a system prompt, the model and a response. This lesson turns to how AI gets packaged and made available to people.
Three Parts of Every Tool
3 Every computer tool can be described in three parts. Input is the data that goes into a tool. For example, when a person presses the keys for 12 + 30 on a calculator, the numbers and the plus sign are the input. Processing is the work done on the input. In a calculator, the processing is the arithmetic that adds 12 and 30. Output is what comes out of the tool after the processing, and in the calculator the output is 42 on the display. An OpenStax computer science textbook describes the same pattern in a computer. Input devices take input from a user, the processor carries out the program's instructions, and output devices turn the results into a form such as a picture on the screen.
Input, Processing and Output in an AI Tool
4 A tool that uses a model has the same three parts, and its input is what the user gives it, often typed text and sometimes a photo. The directions printed on a tool's page are not input, because input is what the user gives the tool. The processing is done by the model, and in this course's tools the model runs on a server. The model predicts the answer one token at a time from its parameters, and the output is the generated text that the page displays.
5 Google Lens is one example that many students have used. A student points a phone's camera at something, such as a plant in the school courtyard, and asks a question about it, such as what plant it is. The photo and the question are the input. Google sends them to its servers, where a Gemini model customized for Google Search does the processing. The AI Overview that appears at the top of the search results is the output. The phone's screen does not do the processing, since it only displays what came back. The photo is not output either, even though it stays on the screen. Figure 1 shows the general pattern for tools like this one, where a system prompt written by the builder travels with the input into the model.
The Programs Around the Model
6 Apart from the model and the system prompt, every part of the tool is an ordinary program. These programs include the page in the browser, the server code that receives the request, adds the system prompt and calls the model, and the code that carries the answer back to the page. Mistral's documentation describes what the server code has to build. Each request names the model to use and carries a list of messages, and each message has a role, such as system or user. The response carries the generated message, which the server code reads and passes back to the page.
7 People write these programs in programming languages. A programmer writes the instructions as source code in plain text files, and the computer runs the finished program. Packaging AI is mostly this work. The model does the processing, while programs written by people carry the input in and the output out. Two tools can use the same model and still behave differently, because each tool has its own system prompt.
8 Java is one of the programming languages used to write programs that run on servers. The rest of this week is about Java: where it came from, why it is used, where it runs and why it matters for AP Computer Science A.
Summary
9 Every tool has input, processing and output. In a tool that uses a model, what the user gives it is the input, the model does the processing on a server, and the generated text is the output. The page and the server code around the model are ordinary programs that people write in a programming language, and Java is one of those languages.
Sources: Franchitti, Introduction to Computer Science, OpenStax (2024); Mistral AI, Chat completions and API reference (n.d.); Oracle, About the Java Technology (n.d.); Oracle, The Java EE Tutorial (2014); Google, Ask questions in new ways with AI in Search (2024) and Generative AI in Search (2024); Week 12 passages, class site (2026).
Read the passage, then answer each question in your notebook.
The main purpose of the passage is to:
- argue that AI tools should run on Chromebooks instead of servers.
- compare Google's Gemini model with Mistral's models.
- teach readers how to use Google Lens to identify plants.
- explain how a model is packaged into a tool, using input, processing and output, and show that people write the programs around the model.
According to paragraph 3, in a calculator that adds 12 and 30, which part is the processing?
- the keys pressed for 12 + 30
- the calculator's buttons and screen
- the 42 on the display
- the arithmetic that adds 12 and 30
As it is used in paragraph 5 ("a Gemini model customized for Google Search"), the word customized most nearly means:
- bought by a customer.
- made the same as every other model.
- hidden from users.
- changed to fit a particular use.
The author most likely includes the Google Lens example in paragraph 5 in order to:
- recommend Google Lens over other apps.
- explain how plants in the school courtyard are identified by teachers.
- prove that the phone's screen does the processing.
- show the three parts of an AI tool in a tool many students have used.
Based on paragraph 5, a student takes a photo of a bridge with Google Lens and asks when it was built. Which part is the output?
- the photo of the bridge on the screen
- the question the student asked
- the Gemini model on Google's servers
- the AI Overview that answers the question at the top of the results
According to paragraph 6, which of these is NOT an ordinary program written by people?
- the page in the browser
- the server code that adds the system prompt and calls the model
- the code that carries the answer back to the page
- the model
According to paragraph 7, two tools can use the same model and still behave differently because:
- each tool trains the model again from the start.
- each tool uses a different programming language for the model.
- each tool runs the model on a Chromebook.
- each tool has its own system prompt.
According to paragraph 2, which did the class learn FIRST this semester?
- that the class models run on a server
- the parts it takes to turn a model into a tool
- that a model generates text one token at a time
- that a language model is a parameter file and a runtime
Which statement from the passage best supports the claim that "Packaging AI is mostly this work"?
- The phone's screen does not do the processing.
- Java is one of the programming languages used to write programs that run on servers.
- Input is the data that goes into a tool.
- The page and the server code around the model are ordinary programs that people write.