AI Engineering, story 9Where is my order?

HM Nayem asks about a parcel

1 of 11

Where is my order?: AI Engineering, story 9

HM Nayem asks about a parcel. The answer is in no help page and the model cannot know it. Watch how it gets it anyway.

The model can't look anything up; it asks, and the shop's code does it.

The story, step by step

  1. HM Nayem asks about a parcel

    HM Nayem wants to know where order 4821 is. The answer is not in any help page. It is a live fact, sitting in the shop's orders database, and it changes by the hour.

  2. The model cannot know

    Asked directly, the model does what it always does: it predicts something that sounds right. And searching the help pages would not help either. Nobody wrote down where this parcel is.

  3. Tell it what it may ask for

    So the server adds something new to the prompt: a description of a tool. Not the tool itself. Just its name, what it does and what it needs. Think of it as a menu the model may order from.

  4. What a tool really is

    A tool is nothing exotic. It is an ordinary function the shop's programmers already wrote, the same one the shop's website uses. The model never sees this code. It only sees the short description on the menu.

  5. The model asks instead of answering

    This time the model does not answer. It replies with a request: please run lookup_order for 4821. That reply is only text in a fixed shape. Nothing has been looked up yet.

  6. The server checks first

    Before running anything, the server checks the request like any other. Is this a real tool? Is the order number valid? Does order 4821 belong to the person asking? The model's request is a suggestion, never a command.

  7. The server does the work

    Only now does anything real happen. The model cannot touch the database. The shop's server runs the lookup itself, against its own data.

  8. Everything is sent again

    The model has no memory, so the server sends the whole exchange again: the question, the model's own request, and now the result at the end.

  9. Now it can answer

    With real data in front of it, the model writes the answer and it streams back to HM Nayem. Two calls to the model, with one lookup in between.

  10. Who is in charge

    This split matters. The model decides what would help. The server decides whether it happens. That is what makes it safe to offer tools that change things, like issuing a refund.

  11. Now at real speed

    Here is the whole trip, as fast as it really happens. This is the moment a chatbot stops guessing and starts knowing. It is called tool calling.

The model asks. The shop's code acts.

Ideas in this story