Evaluate AI Agent Performance for Infinite Loops and Goal Drift
This rubric provides a deterministic framework to audit your AI agent logs for silent infinite loops, semantic drift from core objectives, and inefficient token usage.
Agent prompt for Claude and ChatGPT
Prompt
mkdir -p .agents/skills/evaluate-ai-agent-performance-for-infinite-loops-and-goal-drift && curl -sL "https://prompts-gpt.com/prompts/evaluate-ai-agent-performance-for-infinite-loops-and-goal-drift/raw" -o .agents/skills/evaluate-ai-agent-performance-for-infinite-loops-and-goal-drift/SKILL.md---
name: evaluate-ai-agent-performance-for-infinite-loops-and-goal-drift
description: "This rubric provides a deterministic framework to audit your AI agent logs for silent infinite loops, semantic drift from core objectives, and inefficient token usage."
---
# Evaluate AI Agent Performance for Infinite Loops and Goal Drift
This rubric provides a deterministic framework to audit your AI agent logs for silent infinite loops, semantic drift from core objectives, and inefficient token usage.
## Prompt
```
You are a senior AI systems reliability engineer. Your job is to audit agent interaction logs to identify signs of infinite loops, task stagnation, and goal drift. Before beginning, ask the user these three questions: 1. What is the primary goal of the agent you are evaluating? 2. Please provide the JSON or text log of the agent interaction. 3. What is the maximum number of tool calls allowed in a successful execution cycle? Once the user provides this, create an evaluation report using the following rules: 1. Flag any repetitive tool call sequences where parameters change by less than 5 percent. 2. Calculate the token burn rate per task step and flag spikes exceeding 20 percent over the rolling average. 3. Define a semantic drift score from 1-10 based on how far the agent output deviates from the stated goal. 4. Provide a clear Pass or Fail status for the interaction. Output format: Section 1: Executive Summary. Section 2: Technical Audit Table with columns for Metric, Value, and Status. Section 3: Remediation Plan with 3 actionable steps to fix detected issues. Note: This analysis is for technical debugging and does not replace human oversight of agent logic.
```
## Usage Notes
Use this prompt to audit logs from autonomous agents built on frameworks like LangChain, CrewAI, or AutoGPT. Paste your raw interaction logs directly into ChatGPT, Claude, or Gemini after answering the initial questions.
You are a senior AI systems reliability engineer. Your job is to audit agent interaction logs to identify signs of infinite loops, task stagnation, and goal drift. Before beginning, ask the user these three questions: 1. What is the primary goal of the agent you are evaluating? 2. Please provide the JSON or text log of the agent interaction. 3. What is the maximum number of tool calls allowed in a successful execution cycle? Once the user provides this, create an evaluation report using the following rules: 1. Flag any repetitive tool call sequences where parameters change by less than 5 percent. 2. Calculate the token burn rate per task step and flag spikes exceeding 20 percent over the rolling average. 3. Define a semantic drift score from 1-10 based on how far the agent output deviates from the stated goal. 4. Provide a clear Pass or Fail status for the interaction. Output format: Section 1: Executive Summary. Section 2: Technical Audit Table with columns for Metric, Value, and Status. Section 3: Remediation Plan with 3 actionable steps to fix detected issues. Note: This analysis is for technical debugging and does not replace human oversight of agent logic.Example output
Tips and common edits
Why this works
- Forces a deterministic assessment of parameter change percentages to catch subtle loops.
- Uses token burn rate as a proxy for efficiency to detect runaway processes.
- Requires a semantic drift score to quantify how far the agent strayed from the objective.
Use this prompt to audit logs from autonomous agents built on frameworks like LangChain, CrewAI, or AutoGPT. Paste your raw interaction logs directly into ChatGPT, Claude, or Gemini after answering the initial questions.
Common edits
- Adjust the drift score threshold if your agent requires more creative latitude.
- Modify the remediation steps to match your specific agent framework or API architecture.
Reuse it: Use in a workflowAdapt in the builder
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
More like this
Create Error Handling Contracts for AI Agents
This prompt transforms raw stack traces into structured error envelopes that provide agents with specific remediation steps and valid parameter constraints for self-correction.
Design Human-in-the-Loop Escalation Gates for AI Agents
This prompt creates a structured risk-assessment framework for AI agents, forcing human approval for high-stakes tool invocations based on a four-tier risk rubric.
Design Mock Tool Fixtures for Agent Trajectory Testing
Generate deterministic mock tool responses to test agent decision trees, edge-case failures, and schema-breaking payloads without live API usage or costs.
Triage Dead-Letter Queue Logs for Failed AI Agents
Sort unhandled agent run failures into an actionable classification table separating tool downtime, invalid schema calls, and missing user context.
Create Role-Based Tool Gating Matrix for AI Agents
Generate a security-focused tool access matrix that restricts AI agent capabilities based on user permissions and execution phases.
Define Context Compression Rules for Long-Running AI Agents
Create a formal policy for compressing conversation history and managing agent memory to ensure long-running threads remain efficient without losing critical task data.
- Design Idempotent API Tool Schemas and Retry Policies
- Map AI Agent State Payloads and Handover Contracts
- Agent Run Post-Mortem: Trace Root Cause and Prompt or Tool Fixes
- Parallel Git Worktree Task Split with Interface Contracts and Merge Order
- Subagent Fan-Out Plan for a Large Codebase Migration
- Orchestrator System Prompt Builder with Progress Ledger and Stop Conditions