System Behavior & Mechanics

AI agents execute tools by generating structured JSON payloads based on injected tool schemas. Lower-parameter or highly quantized local models frequently fail to generate valid JSON schema matches, leading to tool-call failures.


Issue: LLM Hallucinated a Tool Call

The model pretends to execute a tool and outputs a text response, but no execution “thought-chain” is displayed in the UI.

Remediation

  1. Clear Context: Execute /reset in the chat to clear history and prevent past outputs from biasing the JSON generator.
  2. Upgrade Model: Deploy a larger parameter model or a model with a lower quantization level (higher precision).

Issue: LLM Refuses to Execute a Specific Tool (e.g., Web Scraping)

The model explicitly states it cannot or will not call a specific tool.

Remediation

  1. Reduce Prompt Context: Disable all unused tools in the workspace settings to minimize the prompt window size.
  2. Switch Models: Deploy a model with less restrictive alignment training.
  3. Reset Session: Execute /reset and resubmit the prompt.

Issue: LLM Fails to Detect or Execute Any Tools

The model fails to discover tools or fails to output the exact JSON schema required for execution.

Remediation

  1. Isolate Agent Model: Configure the agent to use a high-parameter cloud-based model (or a model fine-tuned specifically for function calling/JSON generation) while retaining local open-source models for standard chat.
  2. Minimize Tool Overhead: Disable unused tools to reduce schema payload in the system prompt.
  3. Reset Context: Execute /reset to clear corrupted chat histories affecting JSON generation.