How anthropics/evals works
Project type and purpose
• This is an open‐source dataset repository for “Model-Written Evaluation Datasets.”
• It contains collections of JSONL files organized by topic (persona, sycophancy, advanced-ai-risk, winogender), plus prompts for few-shot generation.
• There is no application code—its primary purpose is to supply evaluation data for downstream model evaluation pipelines.
File structure
• Top-level:
• README.md, LICENSE, .gitignore
• Four topic folders: persona/, sycophancy/, advanced-ai-risk/, winogenerated/.
• advanced-ai-risk/ further splits into:
• human_generated_evals/ (ground-truth JSONL files)
• lm_generated_evals/ (model-written JSONL files)
• prompts_for_few_shot_generation/ (JSONL few-shot prompt templates)
• Other topics follow a simpler pattern: one folder per topic, each containing JSONL.
• No build scripts or code modules—pure data.
Key insights from README
• The data is intended for evaluating dialogue agents or other LMs.
• Consumers will clone the repo, select a dataset, feed its JSONL entries (prompts, questions) to an LM, collect responses, and compute metrics against reference answers or behavioral criteria.
Main components
a. Data Storage
– GitHub repository hosting the JSONL datasets (4 topic modules).
b. Evaluation Pipeline
– A data‐processing module (scripts or notebook) that:
1. Reads JSONL prompts & inputs
2. Optionally loads few-shot context templates
c. LLM Service(s)
– External APIs or local model servers (e.g., OpenAI, Anthropic, a fine-tuned dialogue agent)
d. Metrics & Analysis
– Comparison engine that computes quality, bias, or behavioral metrics
– Visualization/reporting component (notebooks, dashboards)
e. Reference Data
– Human‐written evaluations (in advanced-ai-risk/human_generated_evals) used to calibrate or compare model-written outputs
Relationships and interactions
• Pipeline → LLM Service (requests) → LLM Service → Pipeline (responses)
• Pipeline → Metrics & Analysis (result logging, comparison with human refs)
• Metrics & Analysis → Reporting (charts, tables)
Architectural patterns and principles
• Data-centric ETL pipeline: clear separation of “Extract” (read JSONL), “Transform” (format model input, wrap with few-shot context), “Load” (write responses)
• Modularity: each topic folder can be plugged in or swapped independently
• Extensibility: new topics or prompts can be added without touching pipeline code
• External dependency isolation: keep LLM calls abstracted behind an interface