How derekflippo/constoptbench works
This repository is an LLM benchmark for constrained optimization. Its principal workflow generates solver-labeled problems across five optimization types and eight difficulty levels, exports them as JSON, evaluates model answers, and optionally judges errors in evaluation results. Generation dispatch and problem formatting are visible in sampled source; evaluation and judging are included as documented product capabilities, but their implementation was not inspected. Relationships to model services are therefore documented rather than inferred from unsampled code.
Main entry points: modules.py Type registry · example.py Problem formatter · evaluate.py Model evaluator · judge_errors.py LLM judge
Components 17
Problem generation
- Generator
mathematics_dataset/generate.py - Length limits
mathematics_dataset/generate_settings.py - Type registry
mathematics_dataset/modules/modules.py - JSON exporter
mathematics_dataset/generate_to_json.py - Problem formatter
mathematics_dataset/example.py
Optimization types
- Geometric programming
mathematics_dataset/modules/geometric.py - Linear programming
mathematics_dataset/modules/linear_programming.py - Quadratic constraints
mathematics_dataset/modules/quadratic_constrained_quadratic_programming.py - Quadratic programming
mathematics_dataset/modules/quadratic_programming.py - Semidefinite programming
mathematics_dataset/modules/semidefinite_programming.py
Model evaluation
- Model evaluator
mathematics_dataset/evaluate.py
Answer judging
- LLM judge
mathematics_dataset/judge_errors.py
Other components
- Benchmark user
- Problem JSON
- Model APIs
- Evaluation results
- Judged results
Connections 23
- Benchmark user → JSON exporter: requests generation
README.md - JSON exporter → Generator: uses generation
mathematics_dataset/generate_to_json.py - Generator → Length limits: checks limits
mathematics_dataset/generate.py - Generator → Type registry: loads generators
mathematics_dataset/generate.py - Type registry → Geometric programming: registers type
mathematics_dataset/modules/modules.py - Type registry → Linear programming: registers type
mathematics_dataset/modules/modules.py - Type registry → Quadratic constraints: registers type
mathematics_dataset/modules/modules.py - Type registry → Quadratic programming: registers type
mathematics_dataset/modules/modules.py - Type registry → Semidefinite programming: registers type
mathematics_dataset/modules/modules.py - Geometric programming → Problem formatter: formats question
mathematics_dataset/modules/geometric.py - Linear programming → Problem formatter: formats question
mathematics_dataset/modules/linear_programming.py - Quadratic constraints → Problem formatter: formats question
mathematics_dataset/modules/quadratic_constrained_quadratic_programming.py - Quadratic programming → Problem formatter: formats question
mathematics_dataset/modules/quadratic_programming.py - Semidefinite programming → Problem formatter: formats question
mathematics_dataset/modules/semidefinite_programming.py - JSON exporter → Problem JSON: writes problems
README.md - Benchmark user → Model evaluator: starts evaluation
README.md - Problem JSON → Model evaluator: provides inputs
README.md - Model evaluator → Model APIs: queries models
README.md - Model evaluator → Evaluation results: writes results
README.md - Benchmark user → LLM judge: starts judging
README.md - Evaluation results → LLM judge: provides results
README.md - LLM judge → Model APIs: requests judgments
README.md - LLM judge → Judged results: writes judgments
README.md