mainframebench-eval
XMainframe: A Large Language Model for Mainframe Modernization — Dau et al. (2024) (arXiv:2408.04660, 2024)
What this evaluates
Probes large language models' ability to reason about legacy mainframe systems, interpret COBOL code, and generate accurate technical summaries. It tests domain-specific code understanding through multiple-choice questions, open-ended QA, and text generation tasks.
Datasets
Metrics
Accuracy (primary) — range: percent
- Percentage of correctly selected options in multiple-choice questions.
MAP — range: [0, 1]
- Mean Average Precision for ranking or retrieving relevant answers in question answering.
F1-Score — range: [0, 1]
- Harmonic mean of precision and recall for generated answers.
BERTScore — range: [0, 1]
- Cosine similarity between contextual embeddings of generated and reference text using BERT.
RougeL — range: [0, 1]
- Recall of the longest common subsequence between generated and reference text.
Meteor — range: [0, 1]
- Metric for evaluation with alignment and synonymy, weighting recall and penalty for fluency.
BLEU-4 — range: [0, 100]
- 4-gram n-gram precision with brevity penalty comparing generated text to references.
Input / output format
Input: Multiple-choice questions with four options (A, B, C, D); open-ended questions about mainframe/COBOL systems; COBOL code snippets requiring natural language summaries.
Output: Single letter option (A/B/C/D) for MCQ; free-text answer for QA; concise natural language summary for COBOL code.
Scoring recipe
def score_mcq(pred, gold):
return 1.0 if pred.strip().upper() == gold.strip().upper() else 0.0
def score_text(pred, gold, metric):
if metric == 'BLEU-4': return compute_bleu(4, gold, pred)
if metric == 'BERTScore': return compute_bertscore(pred, gold)
if metric == 'RougeL': return compute_rouge_l(pred, gold)
if metric == 'Meteor': return compute_meteor(pred, gold)
if metric == 'F1': return compute_f1(pred, gold)
if metric == 'MAP': return compute_map(pred, gold)
Common pitfalls
- Temperature is fixed to ~0 for all evaluations, which may penalize models that perform better with sampling or higher creativity.
- Metrics like BLEU-4 and BERTScore are reported for both QA and Summarization, but reference texts for QA are not explicitly defined (e.g., exact match vs. fuzzy matching).
- MainframeBench size and split details are not provided in the text, making reproducibility difficult without accessing the GitHub repository.
Evidence (verbatim from paper)
We evaluate these LLMs using zero-shot prompting and fixing the temperature hyperparameter to approximately 0, leading to more exploitation of the model’s current knowledge. Metrics for Multiple Choice Question task: Because it involves the direct model to select a single answer from the provided options (A, B, C, D), it is considered a classification task. We use Accuracy to report the performance of methods on multiple-choice questions. Metrics for Question Answering and COBOL Summarization task: We use various metrics in NLP, including MAP, F1-Score, BertScore, RougeL, Meteor, BLEU-4, as the evaluation metrics for these tasks.
Citation
@misc{dau2024xmainframe,
title={XMainframe: A Large Language Model for Mainframe Modernization},
author={Dau et al. (2024)},
year={2024},
note={arXiv:2408.04660}
}
1---2name: mainframebench-eval3description: Probes large language models' ability to reason about legacy mainframe systems, interpret COBOL code, and generate accurate technical summaries. It tests domain-specific code understanding through multiple-choice questions, open-ended QA, and text generation tasks. Use when the user wants to benchmark on MainframeBench, or asks about evaluating this task. Reports Accuracy.4---56# mainframebench-eval78> XMainframe: A Large Language Model for Mainframe Modernization — Dau et al. (2024) (arXiv:2408.04660, 2024)910## What this evaluates1112Probes large language models' ability to reason about legacy mainframe systems, interpret COBOL code, and generate accurate technical summaries. It tests domain-specific code understanding through multiple-choice questions, open-ended QA, and text generation tasks.1314## Datasets1516- **MainframeBench** — total ?; splits: test (-1); repo https://github.com/FSoft-AI4Code/XMainframe1718## Metrics1920- `Accuracy` **(primary)** — range: percent21 - Percentage of correctly selected options in multiple-choice questions.22- `MAP` — range: [0, 1]23 - Mean Average Precision for ranking or retrieving relevant answers in question answering.24- `F1-Score` — range: [0, 1]25 - Harmonic mean of precision and recall for generated answers.26- `BERTScore` — range: [0, 1]27 - Cosine similarity between contextual embeddings of generated and reference text using BERT.28- `RougeL` — range: [0, 1]29 - Recall of the longest common subsequence between generated and reference text.30- `Meteor` — range: [0, 1]31 - Metric for evaluation with alignment and synonymy, weighting recall and penalty for fluency.32- `BLEU-4` — range: [0, 100]33 - 4-gram n-gram precision with brevity penalty comparing generated text to references.3435## Input / output format3637**Input**: Multiple-choice questions with four options (A, B, C, D); open-ended questions about mainframe/COBOL systems; COBOL code snippets requiring natural language summaries.3839**Output**: Single letter option (A/B/C/D) for MCQ; free-text answer for QA; concise natural language summary for COBOL code.4041## Scoring recipe4243```python44def score_mcq(pred, gold):45 return 1.0 if pred.strip().upper() == gold.strip().upper() else 0.04647def score_text(pred, gold, metric):48 if metric == 'BLEU-4': return compute_bleu(4, gold, pred)49 if metric == 'BERTScore': return compute_bertscore(pred, gold)50 if metric == 'RougeL': return compute_rouge_l(pred, gold)51 if metric == 'Meteor': return compute_meteor(pred, gold)52 if metric == 'F1': return compute_f1(pred, gold)53 if metric == 'MAP': return compute_map(pred, gold)54```5556## Common pitfalls5758- Temperature is fixed to ~0 for all evaluations, which may penalize models that perform better with sampling or higher creativity.59- Metrics like BLEU-4 and BERTScore are reported for both QA and Summarization, but reference texts for QA are not explicitly defined (e.g., exact match vs. fuzzy matching).60- MainframeBench size and split details are not provided in the text, making reproducibility difficult without accessing the GitHub repository.6162## Evidence (verbatim from paper)6364> We evaluate these LLMs using zero-shot prompting and fixing the temperature hyperparameter to approximately 0, leading to more exploitation of the model’s current knowledge. Metrics for Multiple Choice Question task: Because it involves the direct model to select a single answer from the provided options (A, B, C, D), it is considered a classification task. We use Accuracy to report the performance of methods on multiple-choice questions. Metrics for Question Answering and COBOL Summarization task: We use various metrics in NLP, including MAP, F1-Score, BertScore, RougeL, Meteor, BLEU-4, as the evaluation metrics for these tasks.6566## Citation6768```bibtex69@misc{dau2024xmainframe,70 title={XMainframe: A Large Language Model for Mainframe Modernization},71 author={Dau et al. (2024)},72 year={2024},73 note={arXiv:2408.04660}74}75```7677- arXiv: 2408.04660