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.4metadata:5 source: https://skillmd.com/skills/qhjqhj00/mainframebench-eval6 skill_kind: dataset_eval7 source_arxiv: 2408.046608 bibtex_key: dau2024xmainframe9 confidence: high10---1112# mainframebench-eval1314> XMainframe: A Large Language Model for Mainframe Modernization — Dau et al. (2024) (arXiv:2408.04660, 2024)1516## What this evaluates1718Probes 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.1920## Datasets2122- **MainframeBench** — total ?; splits: test (-1); repo https://github.com/FSoft-AI4Code/XMainframe2324## Metrics2526- `Accuracy` **(primary)** — range: percent27 - Percentage of correctly selected options in multiple-choice questions.28- `MAP` — range: [0, 1]29 - Mean Average Precision for ranking or retrieving relevant answers in question answering.30- `F1-Score` — range: [0, 1]31 - Harmonic mean of precision and recall for generated answers.32- `BERTScore` — range: [0, 1]33 - Cosine similarity between contextual embeddings of generated and reference text using BERT.34- `RougeL` — range: [0, 1]35 - Recall of the longest common subsequence between generated and reference text.36- `Meteor` — range: [0, 1]37 - Metric for evaluation with alignment and synonymy, weighting recall and penalty for fluency.38- `BLEU-4` — range: [0, 100]39 - 4-gram n-gram precision with brevity penalty comparing generated text to references.4041## Input / output format4243**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.4445**Output**: Single letter option (A/B/C/D) for MCQ; free-text answer for QA; concise natural language summary for COBOL code.4647## Scoring recipe4849```python50def score_mcq(pred, gold):51 return 1.0 if pred.strip().upper() == gold.strip().upper() else 0.05253def score_text(pred, gold, metric):54 if metric == 'BLEU-4': return compute_bleu(4, gold, pred)55 if metric == 'BERTScore': return compute_bertscore(pred, gold)56 if metric == 'RougeL': return compute_rouge_l(pred, gold)57 if metric == 'Meteor': return compute_meteor(pred, gold)58 if metric == 'F1': return compute_f1(pred, gold)59 if metric == 'MAP': return compute_map(pred, gold)60```6162## Common pitfalls6364- Temperature is fixed to ~0 for all evaluations, which may penalize models that perform better with sampling or higher creativity.65- 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).66- MainframeBench size and split details are not provided in the text, making reproducibility difficult without accessing the GitHub repository.6768## Evidence (verbatim from paper)6970> 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.7172## Citation7374```bibtex75@misc{dau2024xmainframe,76 title={XMainframe: A Large Language Model for Mainframe Modernization},77 author={Dau et al. (2024)},78 year={2024},79 note={arXiv:2408.04660}80}81```8283- arXiv: 2408.04660