Course Classroom

When a flight-booking prompt promises more than its tools can do

Lesson summary

Contoso Travel gives its assistant a job in three short fields. By the end of the demonstration, the assistant has a detailed job description. Before giving it to a traveller, work out which promises the application can actually keep. Follow the template, inspect its output, then test a boundary with a fictional fare.

Lesson 6 / 6 · 4 min · Beginner · English

Start here

Learning path

  1. Write the job before the instructions
  2. Put a person at the decision point
  3. Read the three inputs
  4. Audit the generated responsibilities
  5. Edit the template, then rerun the test

The diagrams reconstruct the teaching points. The timestamps link to the recorded lesson.

Write the job before the instructions

Start with a role, an organisation and a responsibility. A second set of instructions tells a model how to expand those inputs into a system message for the eventual assistant. There are two distinct outputs to inspect: the text produced now and the later behaviour it is intended to guide.

Write the job before the instructions · role → template → system

Original GuideWit diagram 1 · Write the job before the instructions. 01:20 · Microsoft video

Put a person at the decision point

The instructor introduces a human approval signal that can end an agent conversation. In a booking system, decide what that approval covers. A traveller who approves a search for flights has given a different instruction from one who approves charging a particular fare.

Put a person at the decision point · request → human → approval

Original GuideWit diagram 2 · Put a person at the decision point. 02:45 · Microsoft video

Read the three inputs

In the code walkthrough the role is travel agent, the company is Contoso Travel, and the responsibility is booking flights. No inventory endpoint, fare rule or payment receipt follows from those three inputs. Record each capability separately before reviewing the expanded instructions.

Read the three inputs · travel agent → Contoso Travel → booking flights

Original GuideWit diagram 3 · Read the three inputs. 03:50 · Microsoft video

Audit the generated responsibilities

The proposed message covers prices, availability and travel requirements among other duties. Take one sentence about pricing and ask what a user would see if the fare service were unavailable. An instruction to provide accurate prices cannot supply a missing quote.

Audit the generated responsibilities · role → template → availability?

Original GuideWit diagram 4 · Audit the generated responsibilities. 04:38 · Microsoft video

Edit the template, then rerun the test

When a generated responsibility exceeds the tools available, change the instruction that produced it. Generate a second draft and repeat the same request. Check that narrowing the promise still lets the assistant explain the next action available to the traveller.

Edit the template, then rerun the test · draft 1 → review → draft 2

Original GuideWit diagram 5 · Edit the template, then rerun the test. 05:14 · Microsoft video

Worked example · Editorial exercise

Input

Action

Expected evidence

Search-only tool; user asks for the fare

Look up a dated quote

Show the returned price and its observation time.

Quote expired before approval

Request a new quote

Offer the changed terms for review.

User approves a search

Record the permitted action

The charge and booking remain pending.

Troubleshooting

Observation

What to check

A reply claims that tickets were issued

Look for a booking reference from the booking service.

The draft promises visa clearance

Locate a supported source and narrow the role if none exists.

Try it

  1. Mark one generated duty as informational and one as an action.
  2. Give the agent a fictional fare of 120 and let it expire before confirmation.
  3. Require a fresh quote and compare the second response with the first.

Expected result. A successful response identifies the stale quote and requests a new decision before any purchase.

Check your understanding

  1. Does a generated responsibility grant tool access?
  2. What does the chapter’s code produce?

Answer key

  1. No. The application must configure and enforce access independently.
  2. A draft system message. A reservation would require a separate successful booking operation.

Glossary

  • System message. Instructions governing an assistant’s role and behaviour.
  • Approval scope. The specific action and terms a person has authorised.

Sources

The linked notebook is the repository version and may use a different implementation.

Microsoft Learn · Microsoft video · Microsoft · Lesson · Microsoft · Notebook