Topic 4 of 5 · 4 min read
Search, code and browsing inside assistants
Goal: Tell from an assistant's output whether it really ran code or searched the web, or only claimed to.
Web search, code execution, file search and browsing in assistants such as ChatGPT, Claude and Gemini are ordinary tools. They only happen if the tool is on, the model called it, and the app shows a result.
Check yourself · 1 of 3
Which of these is the best sign that an assistant really ran code for your calculation?
Why it matters
People often ask an assistant to "check the latest figures" or "run this calculation" and trust the answer. A model with no search tool will still write a fluent answer, because writing fluent text is what it does. Knowing which tools an assistant has, and how to see that they ran, is the difference between a sourced answer and a plausible guess.
The common built-in tools
- Web search. The model writes a query, the app searches, and the results come back as text. Good answers show sources you can open.
- Code execution. The model writes code, a sandbox runs it, and the output returns. Good for arithmetic, data files and charts, where models alone often slip.
- File search. The app looks through documents you uploaded and returns passages to the model.
- Browsing and computer use. The model asks for clicks, typing or page loads; the app performs them and returns what appeared, often as a screenshot.
Names and menus differ by product and change often, so check the settings of the one you use.
How to tell if it really happened
- Look for visible steps. Most apps show "Searching the web", a code block with output, or a list of files read.
- Open the sources. Click the links. Does the page say what the answer claims?
- Check that the output fits the code. If it says it ran code, the result should match what the code does. Run a small case yourself.
- Ask what it used. "Which tool did you use for this figure?" The model may still be wrong, so check the visible steps too.
Before and after
Weak: "Using the latest data, the company has 4,200 staff." No steps, no link.
Better: the transcript shows a search step, two linked pages, and the answer quotes one of them with its date. You can verify it.
What goes wrong
- Claimed, not run. "I ran the numbers" with no code block or output.
- Sources that do not say it. A link is attached, but the page does not contain the claim.
- Tool off. Search is disabled in settings, so the model answers from training data that stops at its knowledge cutoff.
- Stale or partial pages. The search found a page, but it was old or only a snippet.
For engineers
When you use an API, built-in tools usually have to be requested. A response that includes a tool result block is evidence; one with only text is not. Log both.
Examples
Did it run the code?
You paste a column of 40 numbers and ask for the average. Assistant one shows a code block with mean(values) and an output of 18.6. Assistant two says "The average is 18.6." The first can be checked by rerunning the code. The second might have estimated. For anything that matters, prefer the assistant that shows its run.
The link that does not match
An answer says "The regulation took effect in March 2025" and cites a link. You open it: the page is a news summary that says "expected in 2025". The search step ran, but the claim goes beyond the source. Treat it as unverified.
Key points
- Search, code execution, file search and browsing are tools that must be enabled and then called.
- Real tool use leaves visible steps: a search entry, a code block with output, linked sources.
- A fluent answer with no steps may come from training data or be invented.
- Opening the cited pages and rerunning a small case yourself are the fastest checks.
- A link next to a claim is not proof; the page has to actually contain the claim.
Common mistakes
- Assuming every assistant can browse or run code in every mode.
- Accepting 'I checked' or 'I ran it' with no visible step.
- Trusting an attached link without opening it.
- Using a model with no search for facts that changed after its knowledge cutoff.
Check yourself · 2 of 3
An assistant answers a question about this week's news with no search step and no sources. What is the best next move?
Check yourself · 3 of 3
An answer cites a link for a claim. What is the most useful check?
Practice items, not counted towards your mastery.
Start here
- Tool use overview (Claude docs) (opens in a new tab)DocsFree
Shows the request, tool_use, tool_result cycle and who runs each step.
- Function calling guide (OpenAI) (opens in a new tab)DocsFree
The same loop in another vendor's words: the model returns a call, your code runs it, you send the output back.
- Function calling (Gemini API docs) (opens in a new tab)DocsFree
A third vendor's version, with function declarations and how results return to the model.