AI Agents and Tool Use
A language model in a loop: it decides on a step, calls a tool (search, code, an API), reads the result and repeats until the task is done.
Also agents · tool use · function calling · ReAct · agentic AI
Yao et al. (ReAct), 2022; Schick et al. (Toolformer), 2023
Instead of answering from memory, the assistant can use a calculator, look things up and click buttons, checking each result before deciding what to do next.
Where it fits
+All relationships as a list
Is a kind of / part of
Siblings
- BERT
- Direct Preference Optimization
- Embedding
- Fine-Tuning
- Google Translate
- GPT
- Hallucination
- In-Context Learning
- Keyboard Autocomplete
- Large Language Model
- LLM Evaluation and Benchmarks
- Perplexity
- Pretraining
- Prompting
- Retrieval-Augmented Generation
- RLHF
- Sampling and Temperature
- Scaling Laws
- Tokenization
- Vector Database
- word2vec
Uses / built on
How it works
On its own, a large language model only writes text. Give it tools and a loop, and that text can turn into actions:
- The system describes available tools to the model: “search(query)”, “run_python(code)”, “send_email(to, body)”.
- The model writes a structured tool call instead of a final answer.
- Ordinary software runs the tool and pastes the result back into the context.
- The model reads the result and decides: call another tool, or answer.
This think, act, observe cycle (popularized as ReAct) turns a model into an agent that can research, code and operate software. RAG can be seen as the simplest case: one retrieval tool, called once.
Two cautions. Mistakes compound over long chains, so agents need checks, and every tool that reads untrusted content or takes real actions is an opening for prompt injection. Good agent design limits permissions and asks a human before anything irreversible.
Everyday use cases
- Case 01
Coding assistants
Read files, run tests, fix the failure, run the tests again.
- Case 02
Research and analysis
Search several sources, run a calculation, and write up the result with citations.
- Case 03
Booking and admin tasks
Fill forms or update records across tools, ideally with a human confirming the final step.
Famous examples
Strengths, weaknesses and when to use it
Strengths
- Real, current information and exact computation instead of guesses.
- Can complete long multi-step tasks.
Weaknesses
- Errors compound over many steps.
- Taking actions raises security risks such as prompt injection.
When to use itWhen a task needs fresh data, exact computation or actions in other systems.
Compare with
Check yourself
- Q01
What happens after an agent calls a tool?
Show answer
A: The tool's result is added to the model's context, and the model decides the next step