chatgpt-nlp-eval
Pushing the Limits of ChatGPT on NLP Tasks — Sun et al. (2023) (arXiv:2306.09719, 2023)
What this evaluates
Evaluates ChatGPT's few-shot generation and reasoning capabilities across multiple NLP tasks, including question answering, commonsense reasoning, natural language inference, and sentiment analysis. It probes the model's ability to follow task-specific formalizations, leverage retrieved demonstrations, and mitigate hallucination through self-verification.
Datasets
- SQuADv2 — total ?; splits: test (-1)
- TQA — total ?; splits: test (-1)
- MRQA-OOD — total ?; splits: test (-1)
- CSQA — total ?; splits: test (-1)
- StrategyQA — total ?; splits: test (-1)
- RTE — total ?; splits: test (-1)
- CommitmentBank — total ?; splits: test (-1)
- SST-2 — total ?; splits: test (-1)
- IMDB — total ?; splits: test (-1)
- Yelp — total ?; splits: test (-1)
Metrics
accuracy (primary) — range: [0, 1]
- The proportion of instances where the model's generated output exactly matches the ground truth label or answer substring.
Input / output format
Input: Task-specific prompts: for QA, context split into indexed sentences concatenated with a question; for NLI, premise and hypothesis; for commonsense, question with multiple-choice options; for sentiment, input text. Demonstrations are retrieved and appended.
Output: Model generates text following task formalization: e.g., '# (index) answer' for QA; 'yes' or 'no' for each NLI relation; selected option letter/text for others; sentiment keyword for sentiment analysis.
Scoring recipe
def compute_accuracy(predictions, golds):
correct = 0
for pred, gold in zip(predictions, golds):
if pred.strip().lower() == gold.strip().lower():
correct += 1
return correct / len(golds)
Common pitfalls
- ChatGPT's output must strictly adhere to the prompt's expected format (e.g., index + substring for QA); parsing failures occur if the model deviates.
- Performance heavily depends on the demonstration retrieval method; using a fine-tuned retriever vs. random/SimCSE causes significant accuracy drops.
- Hallucination in reasoning tasks can produce plausible but incorrect answers, requiring the self-verification step to correct before final scoring.
Evidence (verbatim from paper)
We use accuracy in three-class (e.g., entail, contrast, neural) as the evaluation metric.
Citation
@misc{sun2023pushing,
title={Pushing the Limits of ChatGPT on NLP Tasks},
author={Sun et al. (2023)},
year={2023},
note={arXiv:2306.09719}
}
1---2name: chatgpt-nlp-eval3description: Evaluates ChatGPT's few-shot generation and reasoning capabilities across multiple NLP tasks, including question answering, commonsense reasoning, natural language inference, and sentiment analysis. It probes the model's ability to follow task-specific formalizations, leverage retrieved demonstrations, and mitigate hallucination through self-verification. Use when the user wants to benchmark on SQuADv2, TQA, MRQA-OOD, CSQA, StrategyQA, RTE, CommitmentBank, SST-2, IMDB, Yelp, or asks about evaluating this task. Reports accuracy.4---56# chatgpt-nlp-eval78> Pushing the Limits of ChatGPT on NLP Tasks — Sun et al. (2023) (arXiv:2306.09719, 2023)910## What this evaluates1112Evaluates ChatGPT's few-shot generation and reasoning capabilities across multiple NLP tasks, including question answering, commonsense reasoning, natural language inference, and sentiment analysis. It probes the model's ability to follow task-specific formalizations, leverage retrieved demonstrations, and mitigate hallucination through self-verification.1314## Datasets1516- **SQuADv2** — total ?; splits: test (-1)17- **TQA** — total ?; splits: test (-1)18- **MRQA-OOD** — total ?; splits: test (-1)19- **CSQA** — total ?; splits: test (-1)20- **StrategyQA** — total ?; splits: test (-1)21- **RTE** — total ?; splits: test (-1)22- **CommitmentBank** — total ?; splits: test (-1)23- **SST-2** — total ?; splits: test (-1)24- **IMDB** — total ?; splits: test (-1)25- **Yelp** — total ?; splits: test (-1)2627## Metrics2829- `accuracy` **(primary)** — range: [0, 1]30 - The proportion of instances where the model's generated output exactly matches the ground truth label or answer substring.3132## Input / output format3334**Input**: Task-specific prompts: for QA, context split into indexed sentences concatenated with a question; for NLI, premise and hypothesis; for commonsense, question with multiple-choice options; for sentiment, input text. Demonstrations are retrieved and appended.3536**Output**: Model generates text following task formalization: e.g., '# (index) answer' for QA; 'yes' or 'no' for each NLI relation; selected option letter/text for others; sentiment keyword for sentiment analysis.3738## Scoring recipe3940```python41def compute_accuracy(predictions, golds):42 correct = 043 for pred, gold in zip(predictions, golds):44 if pred.strip().lower() == gold.strip().lower():45 correct += 146 return correct / len(golds)47```4849## Common pitfalls5051- ChatGPT's output must strictly adhere to the prompt's expected format (e.g., index + substring for QA); parsing failures occur if the model deviates.52- Performance heavily depends on the demonstration retrieval method; using a fine-tuned retriever vs. random/SimCSE causes significant accuracy drops.53- Hallucination in reasoning tasks can produce plausible but incorrect answers, requiring the self-verification step to correct before final scoring.5455## Evidence (verbatim from paper)5657> We use accuracy in three-class (e.g., entail, contrast, neural) as the evaluation metric.5859## Citation6061```bibtex62@misc{sun2023pushing,63 title={Pushing the Limits of ChatGPT on NLP Tasks},64 author={Sun et al. (2023)},65 year={2023},66 note={arXiv:2306.09719}67}68```6970- arXiv: 2306.09719