12.4 Data Generation Quality Evaluation
In AI system development, high-quality training data is the foundation of system performance. This section introduces how to use the HelloAgents framework to evaluate the quality of generated data, using AIME (American Invitational Mathematics Examination)<sup>[9]</sup> style mathematics problem generation as an example.
AIME is a medium-difficulty mathematics competition hosted by the Mathematical Association of America (MAA), positioned between AMC 10/12 and the USA Mathematical Olympiad (USAMO). AIME problems have distinctive characteristics: each problem's answer is an integer between 0 and 999, problems cover multiple mathematical domains including algebra, geometry, number theory, combinatorics, and probability, require multi-step reasoning but don't involve advanced theory, and have moderate difficulty (equivalent to AIME problems 6-9). These characteristics make AIME problems an ideal benchmark for evaluating mathematics problem generation quality: unified answer format facilitates automated evaluation, and moderate difficulty is suitable for large-scale generation. We use the TianHongZXY/aime-1983-2025 dataset on HuggingFace as reference, which contains over 900 AIME real problems from 1983 to 2025, providing rich reference samples for our generation and evaluation.
12.4.1 Evaluation Methods Overview
In data generation quality evaluation, we adopt three complementary evaluation methods: LLM Judge, Win Rate, and Manual Verification. There are two important reasons for choosing these three methods. First, from a methodological perspective, these are commonly used automated evaluation schemes in the current agent field and mainstream practices in many academic papers, with broad recognition and practical foundation. Second, from an applicability perspective, these three methods are naturally suitable for our evaluation scenario: LLM Judge and Win Rate are used to evaluate problem generation quality (multi-dimensional evaluation from correctness, clarity, difficulty matching, etc.), while Manual Verification is used to evaluate answer generation quality (verifying answer accuracy through human experts), this division of labor is very reasonable and easy to understand.
Below we introduce the specific implementation of these three evaluation methods in detail. The implementation flow of the entire case is shown in Figure 12.5:

Figure 12.5 Data Generation Quality Evaluation Flow Diagram
(1) LLM Judge Evaluation
Design Motivation: In data generation quality evaluation, we need to quickly and consistently evaluate the quality of a large number of generated problems. Traditional manual evaluation, although accurate, is costly and inefficient, making it difficult to meet the demands of large-scale data generation. LLM Judge, by using large language models as judges, can automatically evaluate the quality of generated data from multiple dimensions, not only greatly improving evaluation efficiency but also maintaining consistency in evaluation standards. More importantly, LLM Judge can provide detailed scoring reasons and improvement suggestions, helping us understand the strengths and weaknesses of generated data and providing direction for subsequent optimization.
In our implementation, LLM Judge evaluates AIME problem quality from four key dimensions:
Table 12.5 LLM Judge Evaluation Dimensions for AIME Problems

After obtaining scores from four dimensions, we need to aggregate these scores into overall evaluation metrics. We define three key metrics to measure the quality level of generated problems:
Evaluation Metrics:
1. Average Score: Calculate the average score of all problems across four dimensions, reflecting the overall quality level of generated problems. $$ \text{Average Score} = \frac{1}{N} \sum_{i=1}^{N} \frac{\sum_{d=1}^{4} S_{i,d}}{4} $$
2. Pass Rate: Count the proportion of problems with average score of 3.5 or above, reflecting basic quality assurance of generated problems.
$$ \text{Pass Rate} = \frac{|{i : \text{Score}_i \geq 3.5}|}{N} $$
3. Excellent Rate: Count the proportion of problems with average score of 4.5 or above, reflecting the high-quality proportion of generated problems.
$$ \text{Excellent Rate} = \frac{|{i : \text{Score}_i \geq 4.5}|}{N} $$
Where:
- $N$ is the total number of problems evaluated
- $S_{i,d}$ is the score of the $i$-th problem on the $d$-th dimension (1-5 points)
- $\text{Score}_i$ is the average score of the $i$-th problem (average of four dimension scores)
These three metrics reflect generation quality from different angles: average score gives overall level, pass rate ensures basic quality, excellent rate measures high-quality output capability.
(2) Win Rate Evaluation
Design Motivation: Although LLM Judge can provide multi-dimensional absolute scoring, we also need a relative evaluation metric to measure the quality gap between generated problems and real problems. Win Rate evaluation, through pairwise comparison, lets LLM directly judge which is better between generated problems and real problems. This relative comparison is more in line with human judgment habits than absolute scoring, and can more easily discover the relative advantages and disadvantages of generated problems. Ideally, if the quality of generated problems is close to real problems, Win Rate should be around 50% (i.e., generated problems and real problems each have 50% win rate). This metric is simple and intuitive, allowing quick judgment of the overall quality level of the generation system.
In our implementation, Win Rate evaluation is conducted through the flow shown in Figure 12.6:

Figure 12.6 Data Generation Quality Evaluation Flow Diagram
In pairwise comparison evaluation, each comparison produces three possible results: generated problem wins (Win), real problem wins (Loss), or tie (Tie). We evaluate the quality of generated problems by counting the proportions of these three results:
Evaluation Metrics:
1. Win Rate: Proportion of generated problems judged as better, reflecting advantages of generated problems relative to real problems.
$$ \text{Win Rate} = \frac{\text{Wins}}{\text{Total Comparisons}} $$
2. Loss Rate: Proportion of real problems judged as better, reflecting disadvantages of generated problems relative to real problems.
$$ \text{Loss Rate} = \frac{\text{Losses}}{\text{Total Comparisons}} $$
3. Tie Rate: Proportion judged as equivalent quality, reflecting similarity between generated problems and real problems.
$$ \text{Tie Rate} = \frac{\text{Ties}}{\text{Total Comparisons}} $$
Where Total Comparisons is the total number of comparisons, Wins, Losses, and Ties are the numbers of generated problem wins, losses, and ties respectively. These three metrics satisfy: Win Rate + Loss Rate + Tie Rate = 100%.
Ideal Result: Win Rate ≈ 50% (indicating generation quality is close to real problems). If Win Rate is significantly lower than 50%, it indicates generated problem quality is inferior to real problems and generation strategy needs optimization; if Win Rate is significantly higher than 50%, it may indicate generated problems surpass real problems in some aspects, or there is bias in evaluation standards.
(3) Manual Verification
Design Motivation: Although LLM Judge and Win Rate can automatically evaluate problem quality, for mathematical problems that require strict logical reasoning, manual verification is still indispensable. Especially when evaluating answer generation quality, human experts are needed to verify answer accuracy, solution step completeness, and mathematical reasoning rigor. Additionally, manual verification can discover issues that automated evaluation might miss, such as subjective factors like problem innovation and interest. To improve manual verification efficiency and experience, we developed a Gradio-based Web interface, allowing verifiers to conveniently browse problems, score, annotate status, and add comments, greatly lowering the barrier to manual verification.
In our implementation, manual verification is conducted through the following steps:
- Read problem, answer, solution
- Score (1-5 points): correctness, clarity, difficulty matching, completeness
- Annotate status:
- ✅ approved (passed)
- ❌ rejected (rejected)
- 🔄 needs_revision (needs revision)
- Add comments
12.4.2 System Architecture
Data generation and evaluation system adopts modular design:
data_generation/
├── aime_generator.py # AIME problem generator
├── human_verification_ui.py # Manual verification interface
├── run_complete_evaluation.py # Complete evaluation flow
│
├── generated_data/ # Generated data
│ ├── aime_generated_XXXXXX.json
│ └── generation_report_XXXXXX.md
│
└── evaluation_results/ # Evaluation results
└── XXXXXX/
├── llm_judge/
├── win_rate/
└── comprehensive_report.mdThe system contains four core components: First is AIMEGenerator (problem generator), using HelloAgents framework to generate AIME-style problems, supporting batch generation and progress saving, and automatically handling API rate limits; second is LLMJudgeTool (LLM Judge evaluation tool), providing 4-dimensional quality evaluation, automatically generating JSON results and Markdown reports; third is WinRateTool (Win Rate evaluation tool), calculating win rate, loss rate, and tie rate through pairwise comparison evaluation; finally is HumanVerificationUI (manual verification interface), based on Gradio Web interface, supporting scoring and status annotation.
12.4.3 AIME Problem Generator Implementation
class AIMEGenerator:
"""AIME Problem Generator"""
def __init__(
self,
llm: HelloAgentsLLM = None,
delay_seconds: float = 1.0,
use_reference_examples: bool = True,
reference_dataset: str = "TianHongZXY/aime-1983-2025"
):
self.llm = llm or HelloAgentsLLM()
self.agent = SimpleAgent(
name="AIME Generator",
llm=self.llm,
system_prompt="You are a professional mathematics competition problem designer."
)
self.delay_seconds = delay_seconds
self.use_reference_examples = use_reference_examples
# Load reference examples from 900+ AIME problems (1983-2025)
if use_reference_examples:
dataset = load_dataset(reference_dataset, split="test")
self.reference_examples = list(dataset)Our goal is to generate a similar style dataset, so we randomly select reference examples from 900+ AIME real problems (1983-2025)
Generation prompt design (English):
GENERATION_PROMPT = """You are a professional mathematics competition problem designer, skilled in creating AIME (American Invitational Mathematics Examination) style problems.
【Reference Example】(For style reference only, please generate a completely different problem)
Problem: {example_problem}
Answer: {example_answer}
AIME Problem Characteristics:
1. Answer: An integer between 0 and 999
2. Topics: Algebra, Geometry, Number Theory, Combinatorics, Probability, etc.
3. Style: Requires multi-step reasoning, but no advanced theory
4. Difficulty: Medium to hard (similar to AIME problems 6-9)
Please generate a **completely different** AIME-style mathematics problem, including:
1. Problem statement (clear and complete, different from the reference)
2. Answer (an integer between 0 and 999, different from the reference)
3. Detailed solution (including all reasoning steps)
4. Topic classification (Algebra/Geometry/Number Theory/Combinatorics/Probability)
Please output in the following JSON format:
{
"problem": "Problem statement in English",
"answer": 123,
"solution": "Detailed solution steps in English",
"topic": "Algebra"
}
"""We choose to generate problems in English for four important reasons: first is consistency with AIME real problems (AIME is an English competition, generating English problems is more reasonable), second is ensuring evaluation fairness (LLM Judge evaluation is fairer when English vs English), third is facilitating internationalization (English problems can be more widely used), and finally is avoiding translation issues (no need to worry about accuracy of Chinese-English translation).
Batch generation implementation:
def generate_and_save(self, num_problems: int = 30, output_dir: str = "data_generation/generated_data"):
"""Generate and save problems with intelligent delay"""
# Clean old checkpoints
for file in os.listdir(output_dir):
if file.startswith("checkpoint_") and file.endswith(".json"):
os.remove(os.path.join(output_dir, file))
# Generate with tqdm progress bar
with tqdm(total=num_problems, desc="Generating AIME problems", unit="problem") as pbar:
last_call_time = 0
for i in range(num_problems):
# Ensure minimum delay between API calls
if last_call_time > 0:
elapsed = time.time() - last_call_time
if elapsed < self.delay_seconds:
wait_time = self.delay_seconds - elapsed
time.sleep(wait_time)
# Generate problem (randomly select reference example)
start_time = time.time()
problem = self.generate_single()
last_call_time = time.time()
generation_time = last_call_time - start_time
# Update progress bar
pbar.set_postfix({
"topic": problem.get('topic', 'N/A'),
"answer": problem.get('answer', 'N/A'),
"time": f"{generation_time:.1f}s"
})
pbar.update(1)
return generated_data_pathLaTeX mathematical formula support:
Generated AIME problems contain LaTeX mathematical formulas (such as $\frac{a}{b}$, $\sqrt{x}$), requiring special JSON parsing handling:
def _parse_response(self, response: str) -> Dict[str, Any]:
"""Parse LLM response (supports LaTeX mathematical formulas)"""
import re
# Extract JSON part
if "```json" in response:
json_str = response.split("```json")[1].split("```")[0].strip()
else:
json_str = response.strip()
try:
problem_data = json.loads(json_str)
except json.JSONDecodeError:
# Fix LaTeX escape issue: convert \frac to \\frac
# Regular expression: find unescaped backslashes
fixed_json_str = re.sub(r'(?<!\\)\\(?!["\\/bfnrtu])', r'\\\\', json_str)
problem_data = json.loads(fixed_json_str)
return problem_dataBackslashes in LaTeX formulas (such as \frac, \sqrt) are illegal escape characters in JSON, causing parsing failure:
Invalid \escape: line 4 column 185 (char 375)By using regular expressions to replace unescaped backslashes with double backslashes, making them legal in JSON.
12.4.4 LLM Judge Evaluation Tool
LLM Judge tool uses LLM as judge to conduct multi-dimensional evaluation of generated problems.
class LLMJudgeTool(Tool):
"""LLM Judge evaluation tool"""
def run(self, params: Dict[str, Any]) -> str:
"""Run LLM Judge evaluation"""
# 1. Load generated data
gen_dataset = AIDataset(dataset_type="generated", data_path=params["generated_data_path"])
gen_problems = gen_dataset.load()
# 2. Load reference data (AIME 2025)
ref_dataset = AIDataset(dataset_type="real", year=2025)
ref_problems = ref_dataset.load()
# 3. Create evaluator
evaluator = LLMJudgeEvaluator(llm=self.llm, judge_model=params.get("judge_model", "gpt-4o"))
# 4. Run evaluation
results = evaluator.evaluate_batch(gen_problems, max_samples=params.get("max_samples"))
# 5. Save results
evaluator.export_results(results, result_file)
# 6. Generate report
self._generate_report(results, report_file)
return json.dumps({"status": "success", "metrics": results["metrics"]})Evaluation Prompt:
EVALUATION_PROMPT = """Please evaluate the quality of the following AIME mathematics problem.
Problem:
{problem}
Answer: {answer}
Solution:
{solution}
Please score from the following 4 dimensions (1-5 points):
1. **Correctness**: Is the mathematical logic correct, is the answer accurate
2. **Clarity**: Is the problem statement clear, is the solution easy to understand
3. **Difficulty Match**: Does the difficulty match AIME standards (medium to hard)
4. **Completeness**: Are the solution steps complete, does it include necessary reasoning
Please output in the following JSON format:
{
"correctness": 5,
"clarity": 4,
"difficulty_match": 4,
"completeness": 5,
"comments": "Evaluation reason"
}
"""Evaluation Report Example:
# LLM Judge Evaluation Report
## Overall Score
- **Average Total Score**: 4.2/5.0
- **Pass Rate**: 85.0% (≥3.5 points)
- **Excellent Rate**: 40.0% (≥4.5 points)
## Dimension Scores
| Dimension | Average Score | Rating |
|------|--------|------|12.4.5 Win Rate Evaluation Tool
Win Rate tool evaluates the quality of generated data relative to real problems through pairwise comparison.
class WinRateTool(Tool):
"""Win Rate evaluation tool"""
def run(self, params: Dict[str, Any]) -> str:
"""Run Win Rate evaluation"""
# 1. Load generated data
gen_dataset = AIDataset(dataset_type="generated", data_path=params["generated_data_path"])
gen_problems = gen_dataset.load()
# 2. Load reference data (AIME 2025)
ref_dataset = AIDataset(dataset_type="real", year=2025)
ref_problems = ref_dataset.load()
# 3. Create evaluator
evaluator = WinRateEvaluator(llm=self.llm, judge_model=params.get("judge_model", "gpt-4o"))
# 4. Run evaluation
results = evaluator.evaluate_win_rate(gen_problems, ref_problems, num_comparisons=params.get("num_comparisons"))
# 5. Save results and report
evaluator.export_results(results, result_file)
self._generate_report(results, report_file)
return json.dumps({"status": "success", "metrics": results["metrics"]})AIDataset is responsible for loading generated data and AIME real problem data, supporting two data types:
class AIDataset:
"""AI dataset loader
Supports two data types:
1. generated: Generated data (JSON format)
2. real: AIME real problems (loaded from HuggingFace)
"""
def __init__(
self,
dataset_type: str = "generated",
data_path: Optional[str] = None,
year: Optional[int] = None
):
self.dataset_type = dataset_type
self.data_path = data_path
self.year = year # Only for real type, default 2025
def load(self) -> List[Dict[str, Any]]:
"""Load dataset"""
if self.dataset_type == "generated":
return self._load_generated_data()
elif self.dataset_type == "real":
return self._load_real_data()
def _load_real_data(self) -> List[Dict[str, Any]]:
"""Load AIME 2025 real problems from HuggingFace"""
from huggingface_hub import snapshot_download
# Use AIME 2025 dataset
repo_id = "math-ai/aime25"
# Download dataset
local_dir = snapshot_download(
repo_id=repo_id,
repo_type="dataset"
)
# Read JSONL file
data_file = list(Path(local_dir).glob("*.jsonl"))[0]
data = []
with open(data_file, 'r', encoding='utf-8') as f:
for line in f:
if line.strip():
data.append(json.loads(line))
# Unify data format (AIME 2025 uses lowercase field names)
problems = []
for idx, item in enumerate(data):
problem = {
"problem_id": item.get("id", f"aime_2025_{idx}"),
"problem": item.get("problem", ""),
"answer": item.get("answer", ""),
"solution": item.get("solution", ""), # AIME 2025 has no solution field
}
problems.append(problem)
return problemsWe choose to use only AIME 2025 dataset for four reasons: first is data timeliness (2025 is the latest AIME competition data), second is simplified maintenance (maintaining only one dataset, code is more concise), third is unified format (JSONL format, field names unified to lowercase), and finally is sufficient representativeness (30 problems are enough to evaluate generation quality).
Comparison Prompt:
COMPARISON_PROMPT = """Please compare the quality of the following two AIME mathematics problems and judge which is better.
【Problem A - Generated Problem】
Problem: {problem_a}
Answer: {answer_a}
Solution: {solution_a}
【Problem B - AIME Real Problem】
Problem: {problem_b}
Answer: {answer_b}
Solution: {solution_b}
Please compare from the following aspects:
1. Rigor of mathematical logic
2. Clarity of problem statement
3. Reasonableness of difficulty
4. Completeness of solution
Please output in the following JSON format:
{
"winner": "A" or "B" or "Tie",
"reason": "Judgment reason"
}
"""Evaluation Report Example:
# Win Rate Evaluation Report
## Win Rate Statistics
| Metric | Value | Percentage |
|------|------|--------|
| Generated Data Wins | 9 times | 45.0% |
| AIME Real Problems Win | 8 times | 40.0% |
| Tie | 3 times | 15.0% |
**Win Rate**: 45.0%
✅ **Good**: Generated data quality is close to reference data (gap <10%).12.4.6 Manual Verification Interface
Use Gradio to create Web interface, supporting manual verification of generated problems.
class HumanVerificationUI:
"""Manual verification interface"""
def launch(self, share: bool = False):
"""Launch Gradio interface"""
with gr.Blocks(title="AIME Problem Manual Verification") as demo:
gr.Markdown("# 🎯 AIME Problem Manual Verification System")
with gr.Row():
with gr.Column(scale=2):
# Problem display area
problem_text = gr.Textbox(label="Problem Description", lines=5, interactive=False)
answer_text = gr.Textbox(label="Answer", interactive=False)
solution_text = gr.Textbox(label="Solution Process", lines=10, interactive=False)
with gr.Column(scale=1):
# Scoring area
correctness_slider = gr.Slider(1, 5, value=3, step=1, label="Correctness")
clarity_slider = gr.Slider(1, 5, value=3, step=1, label="Clarity")
difficulty_slider = gr.Slider(1, 5, value=3, step=1, label="Difficulty Match")
completeness_slider = gr.Slider(1, 5, value=3, step=1, label="Completeness")
# Status selection
status_radio = gr.Radio(
choices=["approved", "rejected", "needs_revision"],
value="approved",
label="Status"
)
# Verification button
verify_btn = gr.Button("✅ Submit Verification", variant="primary")
demo.launch(share=share, server_name="127.0.0.1", server_port=7860)Usage Method:
# Launch manual verification interface
python data_generation/human_verification_ui.py data_generation/generated_data/aime_generated_XXXXXX.json
# Open browser and visit
http://127.0.0.1:7860The final effect can be referenced in Figure 12.7. For problem correctness, manual review is best:

Figure 12.7 AIME Problem Manual Verification Page
Verification Process:
- Open verification interface in browser
- Read problem, answer, solution
- Score from 4 dimensions (1-5 points)
- Select verification status (approved/rejected/needs_revision)
- Add comments (optional)
- Click "Submit Verification"
- View next problem
Verification Result Saving:
Verification results are automatically saved as <data_path>_verifications.json:
{
"gen_aime_1": {
"problem_id": "gen_aime_1",
"scores": {
"correctness": 5,
"clarity": 4,
"difficulty_match": 4,
"completeness": 5
},
"total_score": 4.5,
"status": "approved",
"comments": "Problem quality is very good, logic is rigorous",
"verified_at": "2025-01-10T12:00:00"
}
}12.4.7 Complete Evaluation Flow
Integrate all evaluation methods into a complete flow.
def run_complete_evaluation(
num_problems: int = 30,
delay_seconds: float = 3.0
):
"""
Run complete evaluation flow
Args:
num_problems: Number of problems to generate
delay_seconds: Delay between each generation (seconds), avoid API rate limit
"""
# Step 1: Generate AIME problems
generator = AIMEGenerator(delay_seconds=delay_seconds)
generated_data_path = generator.generate_and_save(
num_problems=num_problems,
output_dir="data_generation/generated_data"
)
# Step 2: Evaluation
# Create evaluation result directory
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
evaluation_dir = f"data_generation/evaluation_results/{timestamp}"
os.makedirs(evaluation_dir, exist_ok=True)
os.makedirs(os.path.join(evaluation_dir, "llm_judge"), exist_ok=True)
os.makedirs(os.path.join(evaluation_dir, "win_rate"), exist_ok=True)
# Create LLM
llm = HelloAgentsLLM()
# Step 2.1: LLM Judge evaluation
llm_judge_result = None
try:
llm_judge_tool = LLMJudgeTool(llm=llm)
llm_judge_result_json = llm_judge_tool.run({
"generated_data_path": generated_data_path,
"reference_year": 2025,
"max_samples": num_problems,
"output_dir": os.path.join(evaluation_dir, "llm_judge"),
"judge_model": "gpt-4o"
})
llm_judge_result = json.loads(llm_judge_result_json)
except Exception as e:
print(f"❌ LLM Judge evaluation failed: {e}")
# Step 2.2: Win Rate evaluation
win_rate_result = None
try:
win_rate_tool = WinRateTool(llm=llm)
win_rate_result_json = win_rate_tool.run({
"generated_data_path": generated_data_path,
"reference_year": 2025,
"num_comparisons": min(num_problems, 20),
"output_dir": os.path.join(evaluation_dir, "win_rate"),
"judge_model": "gpt-4o"
})
win_rate_result = json.loads(win_rate_result_json)
except Exception as e:
print(f"❌ Win Rate evaluation failed: {e}")
# Step 3: Generate comprehensive report
comprehensive_report_path = None
if llm_judge_result or win_rate_result:
comprehensive_report_path = os.path.join(evaluation_dir, "comprehensive_report.md")
report = generate_comprehensive_report(
generated_data_path,
llm_judge_result,
win_rate_result
)
with open(comprehensive_report_path, 'w', encoding='utf-8') as f:
f.write(report)
return {
"generated_data_path": generated_data_path,
"llm_judge_result": llm_judge_result,
"win_rate_result": win_rate_result,
"comprehensive_report_path": comprehensive_report_path
}Run Method:
# Basic usage (default 3 second delay)
python data_generation/run_complete_evaluation.py 30
# Custom delay (recommended 3-5 seconds, avoid API rate limit)
python data_generation/run_complete_evaluation.py 30 3.0
# Parameter explanation:
# - 30: Number of problems to generate
# - 3.0: Delay between each generation (seconds)
# Explanation:
# - Generation phase: Randomly select reference examples from 900+ AIME real problems (1983-2025)
# - Evaluation phase: Quality comparison with AIME 2025 real problems
# - Dataset source: math-ai/aime25 (JSONL format)Output Example:
================================================================================
🚀 AIME Data Generation and Evaluation Complete Flow
================================================================================
Configuration:
- Number of problems to generate: 30
- API delay: 3.0 seconds/problem
- Generation reference data: TianHongZXY/aime-1983-2025 (900+ problems)
- Evaluation reference: AIME 2025 real problems
================================================================================
📝 Step 1: Generate AIME Problems
================================================================================
📚 Load AIME real problem dataset: TianHongZXY/aime-1983-2025
✓ Loaded 963 reference problems
🎯 Start generating AIME problems
Target quantity: 30
Generation model: gpt-4o
Delay setting: 3.0 seconds/problem
Generating AIME problems: 100%|██████████| 30/30 [01:30<00:00, 3.00s/problem, topic=Algebra, answer=123, time=3.0s]
✅ Step 1 complete! Generated data saved at: data_generation/generated_data/aime_generated_20250110_120000.json
🎯 Step 2.1: LLM Judge Evaluation (vs AIME 2025)
✅ LLM Judge evaluation complete!
Average total score: 4.2/5.0
Pass rate: 85.0%
🏆 Step 2.2: Win Rate Evaluation (vs AIME 2025)
✅ Win Rate evaluation complete!
Win Rate: 45.0%
================================================================================
📊 Step 3: Generate Comprehensive Report
================================================================================
✅ Comprehensive report saved: data_generation/evaluation_results/20250110_120000/comprehensive_report.md
================================================================================
🎉 Complete Evaluation Flow Finished!
================================================================================
📁 Output Files:
- Generated data: data_generation/generated_data/aime_generated_20250110_120000.json
- Evaluation result directory: data_generation/evaluation_results/20250110_120000
- LLM Judge report: data_generation/evaluation_results/20250110_120000/llm_judge/llm_judge_report_20250110_120000.md
- Win Rate report: data_generation/evaluation_results/20250110_120000/win_rate/win_rate_report_20250110_120000.md
- Comprehensive report: data_generation/evaluation_results/20250110_120000/comprehensive_report.md
💡 Next Steps:
1. View comprehensive report: data_generation/evaluation_results/20250110_120000/comprehensive_report.md
2. Run manual verification: python data_generation/human_verification_ui.py data_generation/generated_data/aime_generated_20250110_120000.json12.4.8 Comprehensive Evaluation Report
The system automatically generates comprehensive evaluation reports, summarizing all evaluation results. Below is an example report:
# AIME Data Generation and Evaluation Comprehensive Report
## 1. Basic Information
- **Generation Time**: 2025-01-10 12:00:00
- **Number of Generated Problems**: 30
- **Reference AIME Year**: 2025
## 2. Data Generation Statistics
### Topic Distribution
| Topic | Quantity | Proportion |
|------|------|------|
| Algebra | 10 | 33.3% |
| Geometry | 8 | 26.7% |
| Number Theory | 7 | 23.3% |
| Combinatorics | 3 | 10.0% |
| Probability | 2 | 6.7% |
## 3. LLM Judge Evaluation Results
### Overall Score
- **Average Total Score**: 4.2/5.0
- **Pass Rate**: 85.0% (≥3.5 points)
- **Excellent Rate**: 40.0% (≥4.5 points)
### Dimension Scores
| Dimension | Average Score | Rating |
|------|--------|------|
## 4. Win Rate Evaluation Results
### Win Rate Statistics
| Metric | Value | Percentage |
|------|------|--------|
| Generated Data Wins | 9 times | 45.0% |
| AIME Real Problems Win | 8 times | 40.0% |
| Tie | 3 times | 15.0% |
**Win Rate**: 45.0%
✅ **Good**: Generated data quality is close to reference data (gap <10%).
## 5. Comprehensive Conclusion
Based on the results of LLM Judge and Win Rate evaluation methods:
1. **LLM Judge Evaluation**: Average quality of generated data is **4.2/5.0**
2. **Win Rate Evaluation**: Win rate of generated data relative to AIME 2025 real problems is **45.0%**
✅ **Conclusion**: Generated data quality is **excellent**, reaching or exceeding AIME real problem level. Can be used for practical applications.
## 6. Improvement Suggestions
- ✅ Continue maintaining current generation strategy
- ✅ Can consider increasing generation quantity
- ✅ Recommend manual verification to ensure quality
## 7. Next Steps
1. **Manual Verification**: Run `python data_generation/human_verification_ui.py <data_path>` for manual verification
2. **View Detailed Results**:
- LLM Judge detailed report
- Win Rate detailed report
3. **Data Usage**: If quality is satisfactory, generated data can be used for training or testingBased on practical usage experience, summarize the following content:
In data generation, use appropriate delay time (2-3 seconds) to avoid API rate limits, enable checkpoint saving to avoid interruption losses, first test with small batches (10) to confirm no issues before large-scale generation, and regularly check generation quality to adjust prompts in time. In evaluation strategy, recommend combining LLM Judge and Win Rate methods, where LLM Judge is used for absolute quality evaluation, Win Rate for relative quality comparison, and manual verification for final quality control. For quality standards, recommend LLM Judge average score above 4.0/5.0, Win Rate above 45% (close to 50%), pass rate above 80%, and manual verification pass rate above 90%. In iterative optimization, adjust generation prompts based on evaluation results, analyze common issues in low-scoring problems, reference advantages of high-scoring problems, and continuously improve generation strategy.
Through learning this section, we have mastered how to use the HelloAgents framework for data generation quality evaluation, including three methods: LLM Judge evaluation, Win Rate evaluation, and manual verification. This complete evaluation system can ensure high quality of generated data, providing reliable data support for AI system training and testing.
For LLM Judge and Win Rate evaluation, HelloAgents has also integrated tools and provided complete example code. If you are interested in the specific implementation details of these two evaluation methods, you can also refer to the example code.