Skip to content
Back to skills

Raft Few Shot Classification Eval

ASecurity

Evaluates few-shot text classification on real-world tasks with class imbalance and long inputs. It probes a model's ability to leverage limited labeled examples, domain knowledge, and open-domain retrieval to classify text without a validation set. Use when the user wants to benchmark on RAFT, or asks about evaluating this task. Reports macro-F1.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 11, 2026
researchpythongo

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add qhjqhj00/research-skills-pool --skill raft-few-shot-classification-eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Raft Few Shot Classification Eval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Raft Few Shot Classification Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-raft-few-shot-classification-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-raft-few-shot-classification-eval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: raft-few-shot-classification-eval
description: Evaluates few-shot text classification on real-world tasks with class imbalance and long inputs. It probes a model's ability to leverage limited labeled examples, domain knowledge, and open-domain retrieval to classify text without a validation set. Use when the user wants to benchmark on RAFT, or asks about evaluating this task. Reports macro-F1.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2109.14076
  bibtex_key: alex2021raft
  confidence: high
---

# raft-few-shot-classification-eval

> RAFT: A Real-World Few-Shot Text Classification Benchmark — Alex et al. (2021) (arXiv:2109.14076, 2021)

## What this evaluates

Evaluates few-shot text classification on real-world tasks with class imbalance and long inputs. It probes a model's ability to leverage limited labeled examples, domain knowledge, and open-domain retrieval to classify text without a validation set.

## Datasets

- **RAFT** — total ?; splits: train (50), test (-1)

## Metrics

- `macro-F1` **(primary)** — range: [0, 1]
  - Harmonic mean of precision and recall, averaged across all classes (macro-averaged) for each dataset, then averaged across all 11 datasets.

## Input / output format

**Input**: Natural language text input, task-specific instructions, and exactly 50 labeled few-shot examples. Models may optionally use open-domain web retrieval and unlabeled test data.

**Output**: A single predicted class label from the provided natural language class names.

## Scoring recipe

```python
def compute_raft_score(predictions, gold, datasets):
    dataset_f1s = []
    for ds in datasets:
        preds = predictions[ds]
        golds = gold[ds]
        # Compute macro-F1 per dataset
        f1 = macro_f1_score(golds, preds)
        dataset_f1s.append(f1)
    return sum(dataset_f1s) / len(dataset_f1s)
```

## Common pitfalls

- Using a validation set for tuning is strictly forbidden; only 50 training examples are provided with no validation split.
- Assuming balanced class distributions; datasets exhibit heavy imbalance, making accuracy misleading and requiring macro-F1.
- Counting the 50-shot limit per class instead of per task; the limit applies to the entire task regardless of number of classes.

## Evidence (verbatim from paper)

> Since some RAFT datasets have substantial class imbalances, we use F1 as our evaluation metric. We compute macro-averaged F1 scores, even for binary datasets. To get an overall score, we average across all datasets.

## Citation

```bibtex
@misc{alex2021raft,
  title={RAFT: A Real-World Few-Shot Text Classification Benchmark},
  author={Alex et al. (2021)},
  year={2021},
  note={arXiv:2109.14076}
}
```

- arXiv: 2109.14076

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.