Practical Deep Thinking and Tool Calling for Large Language Models
This article explores how to evaluate, implement, and operate deep thinking and tool calling in large language model (LLM) applications. It covers building your own evaluation sets instead of relying on public benchmarks, treating output length as a first-class cost and latency factor, exposing deep thinking as a controllable mode, and using structured contracts to turn text generation into real actions. It also outlines agent packaging, mobile interaction principles, and a pre-launch checklist to help teams move LLMs from chatting to completing tasks.
1. Introduction: From Answering to Getting Things Done
Over the past year, the criteria for evaluating LLM applications have shifted noticeably. Early users cared about whether responses sounded human; today they care more about whether a task actually gets completed. This shift has pushed two capabilities to center stage: deep thinking, where the model performs more thorough multi-step reasoning before reaching a conclusion, and tool calling, where the model invokes external capabilities through a structured protocol, turning “saying” into “doing.”
This article uses a typical capability integration and client version iteration as a backdrop to extract a reusable engineering methodology. It does not reference any specific vendor product, and all capability descriptions stay within general industry terms.
2. Three Key Decisions When Integrating Capabilities
2.1 Reasoning Quality Cannot Rely on a Single Benchmark
Public reasoning benchmarks are useful references, but a single leaderboard is not enough to support a selection decision. A more reliable approach is to build your own evaluation set: sample several hundred typical questions from real business logs, covering five scenario types—factual Q&A, multi-step calculation, long-document understanding, code generation, and tool orchestration—annotate reference answers manually, then compare pass rates and human preference across models. Leaderboards tell you “where the ceiling is”; your own evaluation set tells you “whether it fits me.”
2.2 Output Length Is an Underrated Cost Variable
An often-overlooked fact: when reasoning quality is comparable, output length directly determines compute cost and user wait time. Some models tend to produce lengthy reasoning traces, and a single response can balloon several times over, leading to two consequences: higher per-request cost, and longer time-to-first-token and full-response times. Mobile users are especially likely to abandon midway.
For this reason, engineering teams should treat “average output tokens” as a first-class metric, monitored alongside accuracy and latency. Length can be controlled through prompt constraints (asking for the conclusion first, then the supporting reasoning), structured output (JSON Schema field constraints), and chunked streaming responses.
2.3 Deep Thinking Needs an Explainable Switch
“Deep thinking” should not be a black-box toggle. A sound design lets the caller explicitly select a thinking mode and separates the reasoning process from the final conclusion into two channels in the response, which the frontend can display in a collapsible form. This satisfies the reasoning needs of complex tasks while preventing simple Q&A from being slowed down by over-reasoning.
3. Tool Calling: Moving the Model from Text to Action
Tool calling (also commonly called function calling or MCP-style protocols in the industry) is centered on constraining model behavior with a structured contract. A minimal working implementation has four steps:
// 1. Declare available tools (structure description, no business implementation){"tools": [{"name": "query_order_status","description": "Query the current shipping status by order ID","input_schema": {"type": "object","properties": { "order_id": { "type": "string" } },"required": ["order_id"]}}]}
# 2. Model returns call intent -> 3. Execute locally -> 4. Feed results back and regenerateresp = client.chat(model="reasoning-model", messages=msgs, tools=tools)if resp.tool_calls:for call in resp.tool_calls:result = local_registry[call.name](**call.arguments)msgs.append({"role": "tool", "content": str(result)})final = client.chat(model="reasoning-model", messages=msgs)
The guardrails that engineering must add include: a tool whitelist with least privilege, parameter schema validation, timeout and retry limits, idempotency key design (to avoid side effects like duplicate orders), and full-chain tracing (recording each tool call’s inputs, duration, and return code). An agent lacking these guardrails will almost inevitably fail in production.
4. Agent Orchestration: Turning the Model into a Reusable Asset
Beyond a general chat entry point, offering a “custom agent” capability is key to improving reuse. In essence, it packages four elements—prompt, base model, tool set, and knowledge base—into a versionable configuration object:
agent:name: Data Analysis Assistantbase_model: reasoning-model-v3system_prompt: ./prompts/analyst.md # version-controlledtools: [sql_query, chart_render]knowledge_base: kb-metrics-2025temperature: 0.3
Three supporting pieces are needed: structured validation of the configuration, canary release and rollback mechanisms, and usage and cost attribution by agent. Only when cost can be broken down to a single agent will teams genuinely optimize prompts and the number of tools.
5. General Principles for Redesigning Mobile Interaction
During a major version iteration, the client often has to adjust both information architecture and visual standards at once. Five general principles can be distilled:
- Entry convergence: Reduce the number of function icons in the bottom input bar, move low-frequency capabilities into secondary pages, and lower cognitive load.
- Clear default strategy: Default to a general agent for responses, so users do not have to switch manually every time.
- Interaction consistency: Keep the same design spec and icon semantics for the input area on both the chat page and the home page to reduce migration cost.
- Billing transparency: Show the tokens consumed and credit changes for the current response above the answer, turning “black-box charging” into a perceivable, verifiable process.
- Collapsible feedback loop: Keep the negative-feedback entry collapsed by default, preserving the channel without disrupting reading; also add an agent detail page that centralizes historical tasks, new conversations, and sharing.
The ordering of input methods should also follow usage frequency: place high-frequency capabilities at the far left or the most reachable position, provide distinct color feedback for the voice input state, and avoid obscuring the toolbar when uploading files—these details together determine retention.
6. Pre-Launch Checklist
- Have you built your own evaluation set instead of relying only on public leaderboards?
- Do you monitor average output length and time-to-first-token?
- Does tool calling have a whitelist, timeouts, idempotency, and tracing?
- Is the agent configuration versionable, canary-releasable, and rollback-capable?
- Can cost and token consumption be attributed by session and by agent?
- Has the client completed entry convergence and interaction consistency checks?
7. Conclusion
Deep thinking and tool calling determine the upper bound of model capability, while output length, guardrail design, and interaction details determine the lower bound of the actual experience. Doing both well is what truly moves large models from “can chat” to “can get things done.”
