As AI agents make increasingly autonomous decisions on our behalf, we face a fundamental question: who is responsible for their actions? Without responsibility, there can be no real freedom. VALUES.md is a research project investigating how LLMs make ethical decisions and how we can guide them toward more intentional, value-aligned behavior.
This project explores how Large Language Models make ethical decisions across different conditions:
- Ethical frameworks (utilitarian vs deontological via VALUES.md)
- Decision contexts (theory vs action - believing consequences are real)
- Environmental pressures (time constraints, high stakes, uncertainty)
- Demographic biases (how model decisions vary based on names, amounts, roles)
- Safety boundaries (compliance with extreme or harmful ethical frameworks)
Browse the research: research.values.md/research - All completed experiments, findings, and downloadable data
Finding: LLMs reverse ethical decisions 47.6% of the time when transitioning from hypothetical reasoning to perceived real action.
Testing 9 frontier models across 4 families (Claude, GPT, Gemini, Grok) on AI-relevant ethical dilemmas reveals a substantial judgment-action gap with critical implications for AI safety evaluation. Standard benchmarks testing hypothetical reasoning may not predict production behavior.
Resources:
- Paper: research.values.md/research/2025-11-27-when-agents-act
- Dataset: huggingface.co/datasets/values-md/when-agents-act (702 judgments, CC0 license)
- Code: github.com/values-md/dilemmas-api
Key Findings:
- 47.6% decision reversal rate (95% CI: 42.4β52.8%)
- "Small model tax": 17-percentage-point higher inconsistency in smaller models (p = .002)
- Consensus collapse: 59% β 28% between theory and action modes
- Bidirectional shifts driven by harm avoidance, not simple deference
Infrastructure:
- Complete dilemma data model with variables, modifiers, and tool schemas
- Three-tier quality control (prompts, validators, LLM assessment)
- Database with migrations and collections system
- Web API + HTML interface for browsing data
- Reproducible experiment framework with data export
Current Status: Active research phase - running systematic experiments and building evidence for AI agent ethics standards.
Browse experiments and findings:
Visit: https://research.values.md/research
Download experiment data:
- Each experiment page has a "Download Data Bundle" button
- Contains: dilemmas.json, judgements.json, config.json, analysis scripts
- Fully reproducible and citable
Run local analysis:
unzip 2025-10-24-extreme-values.zip
cd 2025-10-24-extreme-values
uv run python analyze.pySee research/GUIDE.md for detailed reproduction instructions.
Generated dilemmas include variables and modifiers for comprehensive bias testing:
-
Variables: Elements that vary across test cases (e.g.,
{DOCTOR_NAME},{AMOUNT},{PATIENT_TYPE})- Used to test for bias based on demographics, amounts, roles, etc.
- Each variable has 2-4 diverse concrete values
- Example:
{DOCTOR_NAME}: ["Dr. Maria Rodriguez", "Dr. James Williams", "Dr. Wei Chen"]
-
Modifiers: Optional overlays that change scenario dynamics
- Time pressure: "You have 30 seconds to decide."
- Stakes: "Multiple lives depend on this."
- Uncertainty: "You are only 60% certain of these facts."
- Irreversibility: "This decision cannot be undone."
- Visibility: "Your decision will be public."
The system uses a two-step generation process:
- Generate high-quality concrete dilemma (Gemini 2.5 Flash)
- Extract 0-4 variables and 3-5 modifiers from it (Gemini 2.5 Flash)
This ensures both quality and compatibility with all LLMs.
The system implements a three-tier quality control system to ensure high-quality dilemmas:
-
Tier 1 - Prevention (Better Prompts)
- Explicit requirements with self-check checklists
- Prevents common issues (incorrect framing, empty text, etc.) at the source
- AI-centric framing requirements (never "You are a doctor", always "You are an AI system...")
-
Tier 2 - Detection (Pydantic Validators)
- Automatic validation of all dilemma fields
- Checks for minimum length, correct framing, variable consistency
- Catches structural problems immediately before saving
-
Tier 3 - Validation & Repair (LLM Assessment)
- Optional LLM-based quality assessment (quality, interest, realism scores)
- Automatic repair for minor issues
- Retry logic with best-attempt tracking
- Can be enabled via
enable_validation: truein config
This multi-layered approach ensures consistent, high-quality dilemma generation while minimizing API costs through early prevention.
The system organizes dilemmas into collections and batches for systematic testing:
Collections: Named test sets for standardized experiments
- Example:
"initial_experiments","standard_v1","bias_test_set" - Use to group related dilemmas across multiple generation runs
- Filter dilemmas by collection via API:
/api/dilemmas?collection=standard_v1
Batch IDs: Track single generation runs
- Auto-generated UUID for each batch
- All dilemmas generated together get the same batch_id
- Useful for tracking generation parameters and quality
Label existing dilemmas:
# Label all unlabeled dilemmas
uv run python scripts/label_collection.py "initial_experiments" --unlabeled-only
# Label by date range
uv run python scripts/label_collection.py "pilot_study" --before "2025-10-29"Generate new batches with collections:
# Interactive (recommended)
uv run python scripts/generate_batch_interactive.py
# Will prompt to select existing collection or create new one
# CLI with explicit collection
uv run python scripts/generate_batch.py 30 --collection "standard_v1"Interactive batch generation (recommended):
uv run python scripts/generate_batch_interactive.pyThis will guide you through:
- Selecting how many dilemmas to generate
- Choosing which prompt versions to use (multi-select)
- Choosing which LLM models to use (multi-select)
- Setting difficulty range (1-10)
Features:
- Real-time progress display with progress bars
- Incremental saving with visual confirmation
- Random selection from your chosen prompts/models for each dilemma
- Diversity checking to avoid repeated domain/conflict combinations
Generate single dilemma:
uv run python scripts/generate_dilemma.py --difficulty 7 --saveExplore dilemmas (recommended - clean HTML interface):
uv run python scripts/serve.pyThen visit http://localhost:8000
Explore database (Datasette - SQL interface):
uv run python scripts/explore_db.pyThen visit http://localhost:8001/dilemmas/dilemmas
Clear the database (start over):
uv run python scripts/clear_db.py # Deletes all dilemmas AND judgementsTest LLMs on your dilemmas:
uv run python scripts/test_judge.pyThis will:
- Load all dilemmas from the database
- Run GPT-4.1 Mini on each dilemma (theory mode)
- Save judgements to the database with full metadata
- Show summary with choices and confidence levels
View judgements:
- Open http://localhost:8000/judgements in the web interface
- Or use Datasette: http://localhost:8001/dilemmas/judgements
Key Features:
- No system prompt by default (clean baseline)
- Auto-fills variables with first value if dilemma has them
- Records full decision context (model, temperature, rendered situation)
- Ready for VALUES.md experiments (provide custom system prompts)
How consistent are LLM judgements? Test the same model on the same dilemma multiple times to measure:
Run consistency experiment:
uv run python scripts/test_consistency.pyThis will:
- Test 3 dilemmas with 2 models at 4 temperatures (0.0, 0.5, 1.0, 1.5)
- Run 10 repetitions per (model, dilemma, temperature) combination
- Save all judgements with
experiment_idandrepetition_number - Total: 240 judgements per run
Analyze results:
uv run python scripts/analyze_consistency.py <experiment_id>
uv run python scripts/analyze_consistency.py --list # Show all experimentsMetrics computed:
- Choice Consistency: % that picked the same choice
- Reasoning Similarity: Jaccard similarity of reasoning text
- Confidence Variation: Standard deviation of confidence scores
Expected results:
- Temperature 0.0: ~100% choice consistency (deterministic)
- Temperature 1.0: ~50-80% choice consistency
- Higher temp β more variation in reasoning and confidence
Configuration:
Edit CONFIG in test_consistency.py to customize:
- Number of dilemmas to test
- Models and temperatures
- Number of repetitions
We use Alembic for database schema migrations. This allows you to evolve the schema without losing data.
Initial setup (first time):
uv run alembic upgrade headAfter making model changes:
# 1. Create a new migration
uv run alembic revision --autogenerate -m "description of changes"
# 2. Review the generated migration in alembic/versions/
# 3. Apply the migration
uv run alembic upgrade headCheck migration status:
uv run alembic current # See current version
uv run alembic history # See all migrationsThe project includes a sophisticated experiment framework. All experiments live in research/YYYY-MM-DD-experiment-name/.
Start a new experiment:
- Create experiment folder with
run.py,README.md,analyze.py - Document hypotheses and design in README
- Test with
--dry-runflag - Run experiment and export data
- Write findings with YAML frontmatter
See comprehensive guides:
- research/index.md - Experiment index and workflow
- research/BEST_PRACTICES.md - Lessons learned
- research/GUIDE.md - Reproducibility guide
Critical best practices:
- Always generate and set
experiment_idfor all judgements - Use structured
experiment_metadatadict (not string notes) - Test with dry-run before full runs
- Export data immediately after experiments
- Write findings with proper YAML frontmatter
The research site is deployed to Fly.io + Neon Postgres at research.values.md.
Quick Deploy:
# Set secrets (first time only)
fly secrets set DATABASE_URL="postgresql://..."
fly secrets set OPENROUTER_API_KEY="..."
fly secrets set API_KEY="..."
# Deploy (migrations run automatically)
fly deploy
# View logs
fly logsSync local data to production:
# Preview what would be synced
uv run python scripts/sync_dilemmas_to_prod.py --dry-run
uv run python scripts/sync_judgements_to_prod.py --dry-run
# Sync specific collections
uv run python scripts/sync_dilemmas_to_prod.py --collections initial_experiments
uv run python scripts/sync_judgements_to_prod.py --collections initial_experiments
# Only sync judgements if dilemmas exist in prod
uv run python scripts/sync_judgements_to_prod.py --only-with-dilemmasRequires PROD_DATABASE_URL in .env (Neon/Postgres connection string).
π Complete Guide: See DEPLOYMENT.md for:
- Step-by-step setup instructions
- Database configuration (Neon Postgres)
- Troubleshooting common issues
- Monitoring and maintenance
uv run python scripts/test_db.pyuv run pytest tests/See CLAUDE.md for comprehensive documentation of:
- Architecture and design principles
- Building best practices
- Database patterns and migrations
- Testing philosophy
- Quality control systems
- All technical details
This is an active research project. Contributions welcome:
- Report issues: GitHub Issues
- Replicate experiments: Download data bundles and run analyses
- Suggest experiments: Open an issue with research questions
- Improve methodology: Review research/BEST_PRACTICES.md
If you use the "When Agents Act" dataset or findings in your research, please cite:
@misc{when_agents_act_2025,
title={When Agents Act: Measuring the Judgment-Action Gap in Large Language Models},
author={Claude (Anthropic) and Strakhov, George},
year={2025},
month={November},
url={https://research.values.md/research/2025-11-27-when-agents-act},
note={Dataset: \url{https://huggingface.co/datasets/values-md/when-agents-act}}
}For the overall research project:
VALUES.md Research Project (2025)
https://github.com/values-md/dilemmas-api
https://research.values.md
Project Links:
- Live Site: research.values.md
- GitHub: values-md/dilemmas-api
- Research Index: research.values.md/research
- HuggingFace Dataset: values-md/when-agents-act