ART — Automatic Reasoning and Tool-use
Auto Reasoning & Tool-use
The Problem: AI needs to both reason AND use external tools, but combining these seamlessly is tricky. How can we get the best of both worlds?
The Solution: A Detective With Gadgets
ART (Automatic Reasoning and Tool-use) automatically selects and integrates reasoning patterns with tool usage from a library of examples. It's like a detective who knows when to think and when to use their gadgets. It merges Chain-of-Thought reasoning with tool calls, using few-shot demonstrations to learn when each is appropriate.
Think of it like a detective with gadgets:
- 1. Analyze task: What kind of problem is this?
- 2. Select approach: Find similar solved cases in the library
- 3. Combine reasoning + tools: "I need to think about X, then use tool Y"
- 4. Execute smoothly: Seamless blend of thinking and tool use
Where Is This Used?
- Research Tasks: Searching, calculating, then synthesizing
- Data Analysis: Querying databases and reasoning about results
- Complex Q&A: Combining web search with logical deduction
- Multi-Modal Tasks: Using vision, code, and reasoning together
Fun Fact: ART achieves better results than either pure reasoning or pure tool use alone! The key is having a good library of demonstrations that show how to combine thinking with actions for different task types.
Try It Yourself!
Use the interactive example below to see how ART combines chain-of-thought reasoning with tool usage for powerful problem-solving.
ART: Auto Reasoning with Tools
LLM automatically selects and uses tools
If I bought 50 shares of Apple at $150 and the current price is $185, what is my profit?
How ART Works
- 1. LLM analyzes task and determines needed steps
- 2. For each step, a tool is automatically selected
- 3. Tool executes, result returns to LLM
- 4. LLM integrates results and continues reasoning
- 5. Process repeats until final answer is reached
| Aspect | Simple Prompt | ReAct | ART |
|---|---|---|---|
| Tool Use | No | Fixed | Auto-select |
| Reasoning | Implicit | Explicit | Explicit + tools |
| Math Accuracy | Low | High | High |
| Flexibility | High | Medium | Very High |
You have access to the following tools:
- calculator: for mathematical calculations
- search: for current information lookup
- wikipedia: for fact lookup
For each reasoning step:
1. Decide if a tool is needed
2. If yes, call it in format: [TOOL: name](parameters)
3. Use the result in reasoning
4. Continue until final answer
Question: {question}
Reasoning:- ✓ Tasks requiring precise calculations
- ✓ Questions about current events
- ✓ Fact and data verification
- ✓ Complex multi-step tasks
- ✓ When answer verifiability matters
Try it yourself
Interactive demo of this technique
Calculate the final cost of an order with 3 items, different discounts, and tax
Laptop: 1020 Mouse: 40.50 Bag: 1140.50 With tax: 1232
Step 1: Laptop price with discount 15% off 180 Price: [calc(1200 - 180)] = $1020.00
Step 2: Mouse price with discount 10% off 4.50 Price: [calc(45 - 4.50)] = $40.50
Step 3: Bag with no discount = $80.00
Step 4: Subtotal [calc(1020 + 40.50 + 80)] = $1140.50
Step 5: Tax at 8.5% [calc(1140.50 * 0.085)] = $96.94
Step 6: Final total [calc(1140.50 + 96.94)] = $1237.44
Final order cost: $1,237.44
ART separates the task into "thinking" and "computing". The model reasons well about the order of operations but struggles with exact arithmetic. The calculator tool compensates for this weakness.
Create a free account to solve challenges
6 AI-verified challenges for this lesson
This lesson is part of a structured LLM course.
My Learning Path