---
title: "first prompt"
---
# 02 — Your First Prompt

## The Fortune Teller

Let's start with something fun. Our first prompt asks the model to build us a program.

Open Terminal and start a new Ollama chat:

```bash
ollama run gemma4:26b
```

> If you're using a different model, substitute its name.

You're now in an interactive chat, just like ChatGPT. Type this:

```
Write me a program I can run in the terminal that's a fortune teller
that will show me one of a random 10 fortunes. Then walk me through
how to get it running in the terminal.
```

Press Enter. The model will think for a bit, then respond with code and instructions.

### What's Happening

Right now, this is exactly the same as using ChatGPT — except:

1. The model is running on **your computer**
2. You're not paying anyone per message
3. No one can see what you're asking

The model might not be as smooth or polished as GPT-4 or Claude, and that's fine. It's **yours**.

## Follow the Instructions

The model will give you a script (probably in Python) and instructions for saving and running it. Follow them exactly.

**Pro tip:** If the model tells you to use `nano` or `vim` and you're not comfortable with those, use TextEdit instead. But be careful — TextEdit sometimes saves files as `.rtf` (Rich Text Format) instead of plain text. If that happens, use **Format → Make Plain Text** before saving.

### When Things Go Wrong

They will. That's normal. Here's what to do:

1. Copy the error message
2. Paste it into the chat
3. Tell the model what you did and what happened

For example:

```
I tried saving it with TextEdit but it saved as an RTF file.
Now the file is named fortune.py.txt. What do I do?
```

The model will help you fix it. This "copy the error, paste it back" workflow is something you'll use throughout the course.

## The Airplane Mode Test ✈️

Once the fortune teller is working, here's the magic moment:

1. **Turn on Airplane Mode** (or turn off Wi-Fi)
2. **Ask the model another question**

```
Tell me another fortune
```

It still works. **You don't need the internet.** The model, the code, the conversation — it's all happening on your machine.

This is the core insight: **you have everything you need to run AI locally, offline, for free.**

## Try Different Models

If you downloaded multiple models, try the same prompt with each one:

```bash
ollama run gpt-oss:20b
ollama run qwen3:30b-a3b
ollama run nemotron-3-nano
```

Ask the same fortune teller question to each. Compare the answers. Some models will give cleaner code. Some will give more creative fortunes. Some will struggle.

This comparison will help you develop an intuition for which model to use for which task.

## What You've Learned

- Models know things without the internet — their knowledge is baked into their weights
- You can copy code from the model into a file and run it
- When things break, paste the error back — the model can debug
- The airplane mode test proves the model runs entirely locally

## Let's Do Better

The fortune teller exercise works, but copying and pasting code through TextEdit is a pain. Let's ask the model for a better way:

```
I want to be doing this a bunch of times. Can we come up with a better,
faster way to do this that doesn't involve all this manually renaming stuff?
```

This is where we shift from "copy-paste" to "let the AI handle the files." Keep going — the next section introduces our first real technique.

## Check your understanding

1. **The Airplane Mode Test**: What does turning off your Wi-Fi/Internet connection during the model chat prove about where the computation is happening?
2. **Error Recovery**: If you run a Python script generated by the LLM and it crashes with a traceback error, what is the most efficient troubleshooting workflow?
3. **Model Variations**: Why might two different local models (e.g. Gemma and Qwen) produce different fortunes or code structures when given the exact same prompt?

## Answer key

1. The Airplane Mode Test proves that the LLM is running completely locally on your hardware. No data is sent to external servers, and the inference (model thinking) happens locally.
2. Copy the entire traceback/error output from the terminal, paste it back into your prompt session, and tell the model what happened. Let the model diagnose and patch its own output.
3. Different models have different neural network weights, sizes, and training datasets, which leads to varying capabilities in code generation, creativity, and speed.

**Next: [02 Prompting →](/run-ai-locally/02-prompting/)**
