Research Project

Tool-Augmented Prompting

How can prompts be structured to effectively guide LLMs in selecting and utilizing external tools for multi-step problem solving?

5 Prompting Strategies

Each strategy structures the prompt differently to guide tool selection

🔄

ReAct

Reasoning + Acting

Interleaves Thought → Action → Observation loops. The LLM reasons before each tool call.

Best for: Exploratory problems
⛓️

Chain-of-Tools

Plan → Execute Pipeline

Plans the full tool chain upfront, then executes sequentially with data piping.

Best for: Predictable pipelines
📋

Plan-and-Execute

Decompose → Solve

Separates planning from execution. Breaks problems into sub-tasks, each using one tool.

Best for: Complex multi-part problems

Self-Ask

Follow-up Question Routing

LLM asks itself follow-up questions, each routed to the most appropriate tool.

Best for: Compositional questions
🎯

Adaptive Routing

Intent → Route → Evaluate

Classifies query intent, routes dynamically, and uses confidence-based fallback.

Best for: Diverse queries

4 External Tools

🔍 web_search Factual knowledge lookup
🧮 calculator Arithmetic operations
🌐 api_fetch Weather, stocks, currency, translate
💻 code_executor Sandboxed JavaScript execution

Interactive Demo

Ask a question and compare how each strategy selects tools

Try:

How It Works

1

Question Input

User asks a natural language question

2

Prompt Construction

Strategy injects tool catalog, format rules, and reasoning instructions into prompt

3

Tool Selection

LLM picks the right tool based on prompt structure

4

Execute & Loop

Tool runs, result feeds back, repeat until answer

5

Final Answer

Synthesized from all tool results