Dark Mode

Crystal Generation Evaluation Environment

A structured evaluation environment designed to measure progress in large language models on crystal reasoning, materials science concepts, and structured scientific outputs.

View on Prime Intellect

Overview

This environment was created as an evaluation-only benchmark for large language models, focusing on their ability to reason about crystalline materials, generate structured outputs, and improve performance across progressively more complex tasks.

Rather than testing surface-level text generation, the environment emphasizes scientific consistency, compositional reasoning, and constraint satisfaction.

Motivation

Many existing LLM benchmarks focus on natural language understanding or general reasoning. However, evaluating progress in scientific domains—especially materials science— requires more specialized tasks.

This environment was designed to answer questions like:

Task Design

The environment contains a collection of evaluation tasks that test different aspects of crystal generation and reasoning. Tasks are intentionally diverse to avoid overfitting to a single pattern.

Key characteristics

Supported Evaluation Tasks

The environment evaluates models across five distinct tasks. All tasks utilize the Materials Project (mp-20) dataset as the ground truth source.

1. Composition Constrained Generation

CIF Generation Dataset: MP-20

Goal: Generate a valid, stable crystal structure that strictly adheres to a given chemical formula (e.g., SrTiO3). The model must produce valid lattice parameters and atomic coordinates while maintaining exact stoichiometry.

2. Symmetry-Composition Constrained Generation

CIF Generation Dataset: MP-20

Goal: A dual-constraint task requiring the generated structure to satisfy both a specific chemical composition and a target crystallographic space group (e.g., "Generate LiFePO4 in space group Pnma"). This tests the model's geometric reasoning capabilities.

3. Space Group Classification

Classification Dataset: MP-20

Goal: Analyze a provided crystal structure (lattice vectors and atomic sites) and accurately identify its International Union of Crystallography (IUCr) space group number (1-230) or symbol.

4. Band Gap Prediction

Regression Dataset: MP-20

Goal: Predict the electronic band gap (in eV) given a crystal structure. This tests the model's predictive capabilities.

5. Formation Energy Prediction

Regression Dataset: MP-20

Goal: Estimate the formation energy per atom for a given crystal structure, a fundamental metric for determining thermodynamic stability and synthesizability.

Environment Usage

Quickstart

To run evaluations, you'll need to set up the server and then run the client evaluation script.

Step 2: Run Evaluation

Run the evaluation using vf-eval. Select the appropriate task configuration:

Crystal Generation Task

uv run vf-eval crystal_generation \
--num-examples 5 \
--rollouts-per-example 3 \
-m gpt-5 \
--env-args='{"task":"symmetry-composition"}'

Classification Task

uv run vf-eval crystal_generation  \
--num-examples 5 \
--rollouts-per-example 3 \
-m gpt-5 \
--env-args='{"task":"band_gap"}'

Note: Use -a or --env-args to pass specific configuration as a JSON object.

Environment Arguments

The following arguments can be passed via --env-args to customize the environment:

Metrics

The environment emits the following metrics for tracking performance:

Arg Type Default Description
max_turns int 1 Maximum number of refinement turns (1 for single-shot)
formation_energy_threshold float 0.1 Maximum acceptable formation energy (eV/atom)
Metric Meaning
reward Main scalar reward (weighted sum of criteria)

Use Cases

Why an Environment (Not Just a Dataset)?

By packaging these tasks as an environment, evaluation becomes:

This makes it easier to integrate into automated evaluation pipelines and to track longitudinal progress as models evolve.