How AI Gets Packaged
- Terminology and concepts to look out for: input · processing · output
- Relevance to me: This semester you have spent weeks learning what AI is. Today you look at how AI gets packaged into the apps and sites you actually use.
- Board Question: You open an app and ask its AI a question. Besides the model, what else had to be built so that you could ask? Name two things.
Open the I Do form on the right and answer Section 1 from your first reading.
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.
I Do questions
-
notebook cue: input
A student types a question into an AI study app and clicks Ask. What is the input, and who gives it to the tool?
Check
The input is the question the student typed, and the student gives it to the tool. Input is what the user gives the tool, so the directions printed on the app's page are not input. See Three Parts of Every Tool, paragraph 1, and Input, Processing and Output in an AI Tool, paragraph 1.
-
notebook cue: processing
In a tool that uses a model, which part does the processing: the page on the screen or the model on a server?
Check
The model on a server does the processing. It generates the answer one token at a time, and the page only shows what came back. See Input, Processing and Output in an AI Tool, paragraphs 1 and 2.
-
notebook cue: output
The app shows an answer under the question the student typed. Which part of the screen is the output, and which part is not?
Check
The answer is the output, because it is the text the model generated. The question the student typed is not output, even though it stays on the screen, because it is the input. See Input, Processing and Output in an AI Tool, paragraph 2.
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).
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.
I Do questions
-
notebook cue: input
A student types a question into an AI study app and clicks Ask. What is the input, and who gives it to the tool?
Check
The input is the question the student typed, and the student gives it to the tool. Input is what the user gives the tool, so the directions printed on the app's page are not input. See Three Parts of Every Tool, paragraph 1, and Input, Processing and Output in an AI Tool, paragraph 1.
-
notebook cue: processing
In a tool that uses a model, which part does the processing: the page on the screen or the model on a server?
Check
The model on a server does the processing. It generates the answer one token at a time, and the page only shows what came back. See Input, Processing and Output in an AI Tool, paragraphs 1 and 2.
-
notebook cue: output
The app shows an answer under the question the student typed. Which part of the screen is the output, and which part is not?
Check
The answer is the output, because it is the text the model generated. The question the student typed is not output, even though it stays on the screen, because it is the input. See Input, Processing and Output in an AI Tool, paragraph 2.
The big picture so far (newest on top)
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.
I Do questions
-
notebook cue: input
A student types a question into an AI study app and clicks Ask. What is the input, and who gives it to the tool?
Check
The input is the question the student typed, and the student gives it to the tool. Input is what the user gives the tool, so the directions printed on the app's page are not input. See Three Parts of Every Tool, paragraph 1, and Input, Processing and Output in an AI Tool, paragraph 1.
-
notebook cue: processing
In a tool that uses a model, which part does the processing: the page on the screen or the model on a server?
Check
The model on a server does the processing. It generates the answer one token at a time, and the page only shows what came back. See Input, Processing and Output in an AI Tool, paragraphs 1 and 2.
-
notebook cue: output
The app shows an answer under the question the student typed. Which part of the screen is the output, and which part is not?
Check
The answer is the output, because it is the text the model generated. The question the student typed is not output, even though it stays on the screen, because it is the input. See Input, Processing and Output in an AI Tool, paragraph 2.
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).
Revisit your response to the Board Question.
Discuss with your table or partner if possible.
Chromebooks stay closed while you talk. Then answer Section 3 of the I Do form right here under My View and submit it. This is the last time you answer today's Board Question.
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.
This form has three sections. Section 1: your first answer to the Board Question. Section 2: nine reading questions on the passage, like the ACT. Section 3: the Board Question one last time, at the end of the I Do.
CR 1. Board Question: You open an app and ask its AI a question. Besides the model, what else had to be built so that you could ask? Name two things. Give your answer and one reason.
Write your answer in your lab notebook, labeled CR 1.
MC 1. The main purpose of the passage is to:
- explain how a model is packaged into a tool, using input, processing and output, and show that people write the programs around the model.
- argue that AI tools should run on Chromebooks instead of servers.
- teach readers how to use Google Lens to identify plants.
- compare Google's Gemini model with Mistral's models.
MC 2. According to paragraph 3, in a calculator that adds 12 and 30, which part is the processing?
- the arithmetic that adds 12 and 30
- the keys pressed for 12 + 30
- the 42 on the display
- the calculator's buttons and screen
MC 3. As it is used in paragraph 5 ("a Gemini model customized for Google Search"), the word customized most nearly means:
- changed to fit a particular use.
- bought by a customer.
- made the same as every other model.
- hidden from users.
MC 4. The author most likely includes the Google Lens example in paragraph 5 in order to:
- show the three parts of an AI tool in a tool many students have used.
- 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.
MC 5. 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 AI Overview that answers the question at the top of the results
- the photo of the bridge on the screen
- the question the student asked
- the Gemini model on Google's servers
MC 6. According to paragraph 6, which of these is NOT an ordinary program written by people?
- the model
- 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
MC 7. According to paragraph 7, two tools can use the same model and still behave differently because:
- each tool has its own system prompt.
- each tool runs the model on a Chromebook.
- each tool trains the model again from the start.
- each tool uses a different programming language for the model.
MC 8. According to paragraph 2, which did the class learn FIRST this semester?
- that a language model is a parameter file and a runtime
- that a model generates text one token at a time
- that the class models run on a server
- the parts it takes to turn a model into a tool
MC 9. Which statement from the passage best supports the claim that "Packaging AI is mostly this work"?
- The page and the server code around the model are ordinary programs that people write.
- Input is the data that goes into a tool.
- The phone's screen does not do the processing.
- Java is one of the programming languages used to write programs that run on servers.
CR 2. Revisit your response to the Board Question. Discuss with your table or partner if possible. You open an app and ask its AI a question. Besides the model, what else had to be built so that you could ask? Name two things. Give your answer now. Did it stay the same or change? Say what from the reading or your discussion made it stay or change.
Write your answer in your lab notebook, labeled CR 2.