Views
No views yet
1# Clone the repository or download files
2pip install pandas openpyxl requests matplotlib seaborn numpy
3
4# Set your OpenRouter API key
5export OPENROUTER_API_KEY="your_api_key_here"1# Run comprehensive evaluation (256 models × 20 tests)
2python test_comprehensive_20_verified.py
3
4# Generate analysis and visualizations
5python analyze_comprehensive_final.pytest_comprehensive_20_verified.py - Main test runnerquestions.json - Complete test bank (20 diagnostic prompts)models_verified_working_v2_20251014_091649.py - Model configurationanalyze_comprehensive_final.py - Comprehensive analysis pipeline
requirements.txt - Python dependenciesREADME.md - This file (setup and usage instructions)questions.json to add new diagnostic tests:1{
2 "id": 21,
3 "test_name": "Your New Test",
4 "category": "Custom Category",
5 "difficulty": "medium",
6 "prompt": "Your instruction prompt here",
7 "expected_output": "Exact expected response",
8 "exact_match": true,
9 "case_sensitive": false
10}models_verified_working_v2_20251014_091649.py or create your own model list:1MODELS = [
2 {
3 "name": "provider/model-name",
4 "provider": "provider",
5 "verified": True
6 },
7 # Add more models...
8]analyze_comprehensive_final.py to:comprehensive_20_tests_results_YYYYMMDD_HHMMSS.xlsx)comprehensive_20_tests_results_YYYYMMDD_HHMMSS.json)fig1_heatmap.pdf - Performance matrixfig2_provider.pdf - Provider comparisonfig3_difficulty.pdf - Test difficultyfig4_category.pdf - Category performancepaper_tables.tex)1# Use the frozen model list from October 14, 2025
2python test_comprehensive_20_verified.py
3
4# Use the frozen test bank
5# (questions.json is already frozen at 20 tests)
6
7# Generate analysis with same parameters
8python analyze_comprehensive_final.py1# Edit test_comprehensive_20_verified.py
2# Change MODELS to a subset:
3MODELS = [
4 "openai/gpt-4o",
5 "anthropic/claude-3.7-sonnet",
6 "google/gemini-2.0-flash-exp:free",
7 "meta-llama/llama-3.3-70b-instruct",
8 "qwen/qwen-plus-2025-07-28:thinking"
9]1import requests
2import json
3
4# Load questions
5with open('questions.json', 'r') as f:
6 questions = json.load(f)
7
8# Test a single model
9model = "openai/gpt-4o"
10for q in questions:
11 response = requests.post(
12 "https://openrouter.ai/api/v1/chat/completions",
13 headers={"Authorization": f"Bearer {OPENROUTER_API_KEY}"},
14 json={
15 "model": model,
16 "messages": [{"role": "user", "content": q["prompt"]}]
17 }
18 )
19 # Evaluate response...1import pandas as pd
2
3# Load results
4df = pd.read_excel('results.xlsx', sheet_name='All Results')
5
6# Custom analysis
7top_models = df.groupby('model')['passed'].mean().sort_values(ascending=False).head(10)
8print(top_models)
9
10# Category performance
11category_perf = df.groupby('category')['passed'].mean()
12print(category_perf)1# OpenRouter may rate limit. Add delays between requests:
2time.sleep(1) # Add to test_comprehensive_20_verified.py1# Use export_json_from_excel.py to convert numpy types
2python export_json_from_excel.pypip install pandas openpyxl requests matplotlib seaborn numpy1export OPENROUTER_API_KEY="your_key_here"
2# Or set in Python: os.environ['OPENROUTER_API_KEY'] = "your_key"1@article{young2025instruction,
2 title={When Models Can't Follow: Testing Instruction Adherence Across 256 LLMs},
3 author={Young, Richard J. and Gillins, Brandon and Matthews, Alice M.},
4 journal={arXiv preprint arXiv:2510.18892},
5 year={2025}
6}MIT License
Copyright (c) 2025 Richard J. Young, Brandon Gillins, Alice M. Matthews
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.