compute_metrics
Compute key NLP metrics like BLEU, ROUGE, perplexity, accuracy, and macro-F1 from predictions and references offline.
Instructions
Compute BLEU, ROUGE-1/2/L, perplexity, accuracy, macro-F1 from preds and refs — pure, offline.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"preds": "<preds>",
"refs": "<refs>",
"task": "<task>"
},
"name": "compute_metrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nll | No | ||
| loss | No | ||
| refs | Yes | ||
| task | Yes | ||
| preds | Yes | ||
| logprobs | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||