Σ 0:00▸ 0:00

Giving AI Context · scripted

Walkthrough: Build a Study Planner

Walkthrough: build a study planner

This is an interactive exercise for a shared screen. We will build a small program that uses information we provide to create a study plan. At each step, talk about what context is missing or unclear, change the instruction, and run it again.

We will start with a program that already works, then make it more precise one rule at a time. Each version adds a single rule to the starting prompt, so the class can see exactly what one piece of context changes. By the end, the program will know what to do even when we leave something out.

Step 1 · Give the program a job and an input

We want two study plans. The starting prompt tells AI what to do. The next message supplies our assignments and available time.

Starting prompt · Version 1

Open an AI tool and send the starting prompt in a new conversation. Then send this input:

Version one study planner
user

When I give you my assignments and tests, create two possible study plans.

For each plan:

  • Organize the work by day.
  • Keep the work within the available time I give you.
  • Put the most urgent work first.
  • Explain what information is missing if you cannot make a reasonable plan.
assistant

Ready. Send me your assignments, tests, and available study time.

user

I have a math quiz Friday, a history project Tuesday, and English reading Wednesday. I have 45 minutes on school nights and two hours Sunday.

assistant

Plan 1: Spread it out
Monday: Math review
Tuesday: Begin history project
Wednesday: English reading
Sunday: Finish and review

Plan 2: Finish early
Monday: Math review and English reading
Sunday: Complete the history project and review math.

The program used the information we supplied. It did not know our assignments or our available time before we provided them.

Notice what it did not have to be told. It already knew what a study plan is and how to spread work across days. That came from training. The assignments and the time came from us. Now look closely at the plans. Nothing in the starting prompt stopped the program from putting more work on a school night than the 45 minutes we said we had. We never told it that mattered.

Step 2 · Tell it what matters

Now add a rule that protects an important condition: do not schedule more work than the available time.

Revised starting prompt · Version 2

Start a new conversation, send the revised prompt, and send the same assignments again. Ask students what changed because the input stayed the same but the context became more precise.

This is the first kind of context we are adding: a constraint. The input did not change. We told the program what mattered about it, and it respected the limit. For the next step, go back to the starting prompt and add a different rule, so students see the effect of one change on its own.

Step 3 · Specify the output

Suppose we want plans that are easy to compare. Add a format rule with headings and a short reason for each plan.

Revised starting prompt · Version 3

Run the same input again. The facts did not change. The instruction changed how the result is organized.

That is the second kind of context: a rule about the output. Every rule so far assumed we gave the program everything it needed. The last step is about what happens when we do not, and it is the rule that matters most.

Step 4 · Tell it what to do when information is missing

Finally, remove the available study time from the input. Add a rule telling AI not to invent it.

Revised starting prompt · Version 4

The program asks for missing context
user

When I give you my assignments and tests, create two possible study plans.

For each plan:

  • Organize the work by day.
  • Keep the work within the available time I give you.
  • Put the most urgent work first.
  • Explain what information is missing if you cannot make a reasonable plan.
  • If I do not give you available study time, ask me for it before making a plan.
assistant

Ready. Send me your assignments, tests, and available study time.

user

I have a math quiz Friday and a history project Tuesday.

assistant

How much time do you have available for studying on each day?

The program did not guess. We gave it a rule for recognizing missing context and asking for it.

This is the point from the lesson: context is not only the details we specify. It is also what the program should do about the details we leave out. Without that rule, the earlier version would have produced a confident plan built on a study time it invented, the same way the lecture’s doubling program answered “a flock of geese” with “two flocks of geese” instead of saying that it was not a number. Ask students where else a missing or unclear input could send the planner guessing, such as an assignment with no due date or a day with no time listed, and what rule would catch it. Writing those rules for a program of their own is exactly what they will do in the practice.