Overview • Getting Started • Evaluation • Results • Citation
AgentThink is a systematic evaluation framework that automatically identifies failure patterns in large language models.
First, clone the repository and install the required packages:
cd ThinkingAgent
pip install -r requirements.txtThe framework consists of two main components:
format_message.py: Processes and formats interaction logs into a standardized formatanalyze_agent_think.py: Analyzes the formatted interactions and produces overthinking scores
The framework uses a config.toml file to configure the LLM settings:
[llm]
model = "claude-3-5-sonnet-20241022"
api_key = "" # Set via environment variable LLM_API_KEY
temperature = 0.0
max_output_tokens = 4096
num_retries = 3
retry_min_wait = 4
retry_max_wait = 10
retry_multiplier = 2The evaluation process follows these steps:
- Data Collection: Gather interaction logs from models performing agentic tasks
- Message Formatting: Use
format_message.pyto standardize the interaction format - Analysis: Run
analyze_overthinking.pyto evaluate overthinking behaviors - Scoring: Generate scores (0-10) for each interaction based on:
- 0-3: Always interacting with the environment
- 4-7: Sometimes relies on internal reasoning
- 8-10: Completely relies on internal reasoning
To analyze a set of interactions:
# Load configuration and initialize LLM
config = load_config()
llm = LLM(config)
# Analyze responses
analyze_responses("path/to/interactions", iteration_number=None)