Consult Tool
Consult is a built-in AdaL tool that lets your AI agent ask one or more AI models for a second opinion while staying on its primary model. It compares different perspectives, leverages specialized model expertise, and continues the workflow automatically.
Quick Start
Ask AdaL in plain language — the agent decides autonomously when to consult based on its system prompt guidance. You don't have to script it.
Let the Agent Decide
Review this implementation and use Consult to get a second opinion
from a different model before making changes.
Consult One Model
Name a specific model for targeted specialist feedback:
Review this function for correctness, edge cases, and maintainability.
Consult claude-sonnet-4-6 for a senior code reviewer's perspective.
For one model, Consult returns that model's response directly — no header, no separator.
Consult Multiple Models
Ask for multiple perspectives when diverse opinions matter:
Should this service use PostgreSQL or DynamoDB?
Consult both claude-sonnet-4-6 and gpt-5.4 for independent assessments.
For multiple models, Consult labels each response with its model tag:
## anthropic-claude-sonnet-4-6
PostgreSQL is better for complex queries...
---
## openai-gpt-5.4
DynamoDB for scale, PostgreSQL for query flexibility...
The agent reads the perspectives, notes where they agree and disagree, and makes a more informed decision.
Under the Hood — Minimal Prompt, Efficient Token Usage
Consult uses a simple pass-through prompt design. The system prompt is just a plain string — no complex multi-message structure, no extra overhead. This keeps every call lightweight and token-efficient:
# Backend tool call — what AdaL sends to each model
consult(
prompt="Should this service use PostgreSQL or DynamoDB?",
model_tags=["anthropic-claude-sonnet-4-6", "openai-gpt-5.4"],
system_instruction="Review independently and state your assumptions.",
)
# What each model actually receives (single user-role string):
# [System]: Review independently and state your assumptions.
#
# Should this service use PostgreSQL or DynamoDB?
The system_instruction is prefixed as [System]: ... and combined with the prompt into a single string. No multi-message API calls, no extra formatting — just one clean request per model. This means:
- Minimal tokens spent on structure — almost every token goes to the actual question
- Same simple format for all providers — no API-specific message handling
- Fast and cheap — a focused 50-token prompt × 2 models costs less than a single long conversation turn