Separate read-only lookup from a change

Keep action verbs and their objects together. · 204 words

A read-only lookup returns facts but does not change anything. A change tool, such as create_hold, creates a new state. Put those jobs in separate steps and name the tools. For a bookstore example, write: "First call catalog_search for 'The River Atlas'. Report the title, author, and availability text exactly as shown in the catalog record. Do not create a hold." The source detail is the catalog_search result, not memory. A checkable result is a short table with those fields, no hold ID, and no claim that a copy was reserved.

Design the change prompt only after the lookup. For a museum example, a catalog may show an unused tour slot, but viewing it does not book it. Write: "Call create_tour_booking for the River Atlas Museum on 10 May at 2 PM. If it succeeds, report the booking ID, slot, and status from the receipt. If it fails, say it failed." The source details are the tool receipt and the resulting booking record. The checkable result is a record whose ID matches the receipt and whose status is 'confirmed'. If the service cannot return a receipt or look up the record, report that the booking status is unknown and check before making another request.

Check your recall

In the bookstore example, which tool may run, and what shows that no hold was created?

Check your answer

Only catalog_search may run in the lookup prompt. No hold ID or reservation claim appears in the result, and the answer contains the title, author, and availability from the catalog record.

Sources and credits

Original KeyTouch lesson. Background reading · Microsoft · Generative AI for Beginners.