# Mac exercise for mission 2.3: Summarize a customer call and count the tokens

Part of the course “AI from Zero to Autonomous Agents” (https://llm.yoga/en). Page for humans: https://llm.yoga/en/mac-2-3

About 15 minutes at your computer · Type this address: **llm.yoga/en/mac-2-3**

In the mission you worked with assumptions: 15,000 tokens in, 800 out. Here you count for yourself. A local model summarizes a short sample call, Ollama reports how many tokens went in and came out, and you use the prices from the mission to work out what the same summary would cost in the cloud. On your own computer you don’t pay for it in money, you pay in time.

**Before you start**

You need **Ollama** in the terminal. Ollama comes as an app: download it from ollama.com/download and drag it into your Applications folder. On first launch, the app asks permission, if needed, to set up the `ollama` terminal command. It requires macOS 14 or newer. More on this in [chapter 10](https://llm.yoga/en/10-lokale-modelle-4.md). Check:

```
ollama --version
```

### 1. Download the model

qwen3:8b is 5.2 GB and fits on Macs with 16 or 24 GB. With 8 GB, use qwen3:1.7b (1.4 GB) and replace the name in all commands.

```
ollama pull qwen3:8b
```

**At the end it says**

```
success
```

### 2. Create a sample call

Don’t use a real customer call for this trial run: a call can be recorded and transcribed only if everyone involved has agreed (check question 3 in the mission). These notes are an example; the companies and people are made up. They’re in German, as in the measurement. Lena from the software vendor Beispielsoft talks with Tom, IT lead at Musterhandel GmbH. Tom’s team plans routes for three warehouses in Excel, which takes about two hours every morning; there are twelve dispatchers and about 40 drivers. Tom worries about the drivers’ location data. Lena promises to send the data processing agreement and a quote by Friday, and the list of interfaces Tom needs comes with the quote. Tom will check with his data protection officer by the end of May. If everything works out, they would test for two weeks in June with one warehouse, and Lena will call again on June 2. Copy all lines into the terminal at once.

```
cat > gespraech.txt <<'EOF'
Gesprächsprotokoll (Beispiel: Firmen und Personen sind erfunden). Videocall am 12. Mai, gekürzte Mitschrift.
Lena (Vertrieb, Beispielsoft): Danke, dass Sie sich Zeit nehmen. Wo hakt es bei der Tourenplanung im Moment?
Tom (IT-Leiter, Musterhandel GmbH): Wir planen die Touren für unsere drei Lager noch in Excel. Das kostet jeden Morgen etwa zwei Stunden, und wenn ein Fahrer ausfällt, fangen wir von vorn an.
Lena: Wie viele Leute planen bei Ihnen?
Tom: Zwölf Disponenten, dazu kommen rund 40 Fahrer, die die App bräuchten.
Lena: Unsere Software rechnet die Touren neu, sobald sich etwas ändert. Die Fahrer sehen das sofort in der App.
Tom: Klingt gut. Meine Sorge ist der Datenschutz. Die Standortdaten der Fahrer dürfen nicht einfach irgendwo landen.
Lena: Die Daten liegen in einem Rechenzentrum in Frankfurt. Ich schicke Ihnen bis Freitag unseren Vertrag zur Auftragsverarbeitung und ein Angebot für zwölf Planer und 40 Fahrer.
Tom: Gut. Ich kläre bis Ende Mai mit unserer Datenschutzbeauftragten, ob das so geht. Und ich brauche vorher eine Liste der Schnittstellen, unser Lagersystem muss angebunden werden.
Lena: Die Liste bekommen Sie zusammen mit dem Angebot.
Tom: Wenn alles passt, würden wir im Juni zwei Wochen mit einem Lager testen.
Lena: Dann richte ich den Testzugang ein, sobald Sie mir das Okay geben. Ich melde mich am 2. Juni noch einmal telefonisch.
Tom: Einverstanden.
EOF
```

### 3. Have it summarized

The same job as for Matthias: a short summary, then the next steps. `$(cat gespraech.txt)` puts the whole call into the prompt, `--think=false` turns off Qwen3’s thinking mode, `--verbose` shows times and token counts at the end. The prompt is in German too: summarize this customer call for the CRM in no more than three sentences, then list the next steps with who, what and by when, and write only what was said in the call.

```
ollama run qwen3:8b --think=false --verbose \
  "Fasse dieses Kundengespräch für das CRM zusammen: höchstens drei Sätze, \
dann die nächsten Schritte als Liste mit wer, was, bis wann. \
Schreib nur, was im Gespräch steht. \
Gespräch: $(cat gespraech.txt)"
```

**Output, times shortened (Measured on an M4 Mac (24 GB) on November 25, 2026)**

```
**Zusammenfassung:**
Tom beschwert sich über die manuelle Tourenplanung in Excel, die viel Zeit kostet und fehleranfällig ist. Er ist besorgt um den Datenschutz der Fahrer und braucht eine Liste der Schnittstellen sowie die Zustimmung der Datenschutzbeauftragten. Lena bietet eine automatische Tourenplanung an und versendet Angebot und Vertrag bis Freitag.

**Nächste Schritte:**
- **Tom** klärt mit der Datenschutzbeauftragten bis Ende Mai, ob der Datenschutz passt.
- **Tom** benötigt bis Ende Mai eine Liste der Schnittstellen für die Anbindung des Lagersystems.
- **Lena** sendet Angebot und Vertrag bis Freitag.
- **Tom** bestätigt den Testzugang für ein Lager im Juni.
- **Lena** meldet sich am 2. Juni telefonisch.

total duration:       49.232479208s
prompt eval count:    449 token(s)
prompt eval rate:     39.18 tokens/s
eval count:           202 token(s)
eval rate:            5.12 tokens/s
```

The model answered in German: three sentences on Tom’s Excel problem, his data protection concerns and Lena’s offer, then five next steps. `prompt eval count` is the input, instruction and call together: 449 tokens. `eval count` is the output: 202 tokens. Your summary will be worded differently, so your output count will differ too; a second run on the test Mac came to 178 tokens. The input stays the same within Qwen3, and qwen3:1.7b also counted 449. A model from another family counts with its own tokenizer and gets a different number. If you run the command again, you’ll also see `prompt eval cached`: Ollama still has the beginning in memory. For the math, `prompt eval count` is still what counts. The computer was under load; without load it’s faster.

### 4. Do the math yourself

Calculate as in the mission: tokens times the price per million, input and output separately. The prices come from the mission: Claude Opus 5.5 costs $4 per million input tokens and $20 per million output tokens (as of November 25, 2026). Plug in your own numbers. With the ones from the test Mac:

- Input: 449 × $4 / 1,000,000 = $0.0018.
- Output: 202 × $20 / 1,000,000 = $0.0040.
- $0.0058 per call, times 200 calls is $1.17 a month (calculated with the unrounded values).

Qwen3 counts with its tokenizer, Claude with a different one. The number is still good enough for an estimate; as in the mission, the exact token count depends on language and tokenizer.

### 5. Let the page check it

Paste the lines below your summary, at least `prompt eval count` and `eval count`. The page calculates with your numbers and the prices from the mission and puts Matthias’ assumptions next to them.

The check needs JavaScript. Without it: calculate as in step 4 and compare with the mission’s $0.076 per call.

### 6. Compare with the mission

With the numbers from the test Mac: at 15,000 tokens, the transcript in the mission has just over 33 times as much input as these shortened notes, and its 800-token summary almost four times as much output. And the balance flips. Here the output, at $0.0040, costs more than the input at $0.0018. In the mission the input, at $0.06, costs almost four times as much as the output at $0.016, because the transcript of a 45-minute call is far longer than these notes. If you calculate with 15,000 input tokens and the 202 output tokens from the test Mac, you get $12.81 a month, close to the mission’s $15.20. The input is still the lever.

Locally, you pay in time. `prompt eval rate` tells you how fast the model reads the input: 39.18 tokens per second on the test Mac, under load. At that rate, 15,000 tokens would take just over six minutes before the first word of the summary appears (calculated, not measured). Use the first run for this: when you repeat the command, the input comes from memory and the rate no longer means anything.

### 7. Check it against the notes

The tokens are the small item, checking time is the big one. Start a timer and check each next step against the notes: who does what by when?

On the test Mac, the qwen3:8b output had two errors. It lists the interface list as Tom’s task, due by the end of May; in the call, Lena sends it with the quote by Friday. And Tom only said they would test in June if everything works out, but the summary has Tom confirming the test access. qwen3:1.7b first copied out the entire call again and then gave the contract and the quote to Tom instead of Lena. That costs you twice: 506 output tokens, $0.0101 in the cloud for the output alone, and still no usable summary. (Measured on an M4 Mac (24 GB) on November 25, 2026)

The mission assumes 3 minutes of checking per call. How long did these short notes take you?

### 8. Clean up

Unload the model from memory and delete the call. Leave the model on disk if you’re doing more exercises.

```
ollama stop qwen3:8b
```

```
rm gespraech.txt
```

#### On the DGX Spark

On the Spark, you can run the same comparison with a large model. With the playbook “Chat with LLMs Using Open WebUI and Ollama” (build.nvidia.com/spark/open-webui, 15 to 20 minutes according to NVIDIA) you get a chat interface with built-in Ollama. There you run the same summary with a small and a large model, for example `qwen3:8b` against `gpt-oss:120b`, and count the errors from step 7. Does the large model save enough checking time to justify running it? (Checked against the documentation, not run here)

The trial run with verbatim quotes from a press release is the exercise in [chapter 2](https://llm.yoga/en/02-anwendungsfaelle-5.md). When a process like this pays off is covered there in the section on the [decision](https://llm.yoga/en/02-anwendungsfaelle-4.md).
