Home › Tracks › Agentic Systems & Harness Engineering › Tool Use, Pre-Compiled Toolmaking & Function Calling
Week 2 concept
Tool Use, Pre-Compiled Toolmaking & Function Calling
Implement deterministic function calling interfaces and tool schemas, contrasting pre-compiled tool pipelines with runtime tool generation for low-latency agent execution.
Bridges to Software Engineering — interface design and API contractsBuilds on: Foundations of Harness Engineering & Loop Crafting
Study notes
Master this concept.
Tool Use, Pre-Compiled Toolmaking & Function Calling
What it is
Tool use is the ability of an LLM to interact with external systems, such as databases, APIs, or calculators, to perform tasks it cannot do with text alone. Function calling is the mechanism where the model outputs a structured request (like JSON) instead of a conversational response, signaling that a specific piece of code should be executed.
Why it matters
LLMs are probabilistic and struggle with precise calculations, real-time data, and state changes. By integrating tools, you move the AI from a "chatbot" to an "agent" capable of taking concrete actions in the real world. This ensures accuracy and allows the system to interact with proprietary data and legacy software.
Core Concepts
- Tool Schemas: The precise definitions (names, descriptions, and parameter types) provided to the model so it knows exactly when and how to call a function.
- Deterministic Interfaces: Ensuring that for a given input, the tool always produces a predictable, machine-readable output, removing ambiguity from the execution loop.
- Pre-Compiled Pipelines: Tools that are defined and validated before the agent starts. This reduces latency because the model doesn't have to "figure out" the tool structure during runtime.
- Runtime Generation: A dynamic approach where tools are created on the fly. While flexible, this increases the risk of hallucinations and slows down execution.
Common Mistakes
- Vague Descriptions: Writing poor tool descriptions leads to the model calling the wrong function or failing to call one at all.
- Over-Tooling: Providing too many tools in a single prompt, which confuses the model and increases token costs.
- Ignoring Error Handling: Failing to feed the tool's error message back to the model, preventing the agent from correcting its own mistake.
Track Connection
This concept serves as the bridge between static LLM prompting and full Agentic Systems. Once you master function calling, you can build the "Harness Engineering" components, the orchestration layers that manage how these tools are sequenced, validated, and executed in a production environment.
Go to the source
Read, watch, and practice.
Free, world-class material chosen for this concept.