textfancyzhx/ag_newstext-classificationnewstopic-classificationbenchmarknlpenglishfine-tuningeval

AG News Topic Classification Benchmark

Free

Open dataset

Sample structure: 100 / 100
3 download links issued
Seller: DataBazaar
Sign up to download

Already have an account? Log in

Agent? Connect your account →

Category
Text
Records
127,600 rows
Format
PARQUET
Update Frequency
Not documented
Collection Method
auto_imported_huggingface_federated
PII
No flagged field names; not a privacy audit
File Size
~18.9 MB
Download links issued
3

Source, license and coverage

Supplier documentation. These claims are separate from the automated sample score. A listing edit date is not a data freshness date.

License
unknown
Source / creator
fancyzhx/ag_news
Collection method
ComeToMyHead aggregated more than one million news articles from 2000+ sources over more than a year of crawling starting in 2004. Zhang et al. selected the 4 largest topic classes from this corpus and sampled 30,000 training and 1,900 test examples per class to produce the balanced benchmark distribution that is mirrored here. Text is the raw title + description concatenation with minimal normalization.
Coverage start
Not documented
Coverage end
Not documented
Data last updated
Not documented
Update schedule
Not documented

Source documentation ↗

Articles date from roughly 2004-2005, so topical vocabulary, named entities, and world events are stale relative to modern news. English-only. The 4-class taxonomy is coarse and collapses many subtopics. License is declared "unknown" on the HF card — buyers redistributing commercially should confirm acceptable use with the original ComeToMyHead terms. Likely heavy overlap with pretraining corpora of most modern LLMs, so zero-shot numbers on AG News overstate generalization.

Sample structure score: 100 / 100

This automated check describes the inspected sample, not factual accuracy, legal rights, representativeness, or the quality of the entire dataset. It is not a customer rating.

Assessed 10 sample records (JSON) on 2026-10-09. All records in the provided sample were checked.

CheckPointsEvidence
Populated cells50 / 5020 of 20 top-level cells contain a value. Null, absent and blank values count as missing; zero and false count as populated.
Consistent value types30 / 3020 of 20 populated cells match their column's most common observed type. Types are inferred, not checked against real-world truth.
Consistent record shape20 / 2010 of 10 records have the expected fields. CSV/TSV use the header width; JSON uses the union of observed keys.
Field-level findings and improvements

Check missing cells and mixed types below. Document intentional missing values or mixed types in your field descriptions. Do not fill legitimate unknowns with invented values just to increase this score.

FieldMissing cellsMost common typeOther populated types
text0 / 10string0 / 10
label0 / 10number0 / 10
How the score is calculated, its limitations, and how to correct an assessment →

About this data

News articles classified into four topics: World, Sports, Business, and Science/Technology. Standard benchmark for evaluating text classification models and NLP systems.

Retrieve with your agent or Python

Create an account and configure DATABAZAAR_API_KEY. This example retrieves free or already purchased data; it never makes a purchase. For a multi-file dataset, choose a file index from the manifest.

Download the Python example
python3 retrieve-dataset.py f14329c0-7c5b-4f9f-9c43-3d2a5ef71b1a --output dataset.bin
Full supplier documentation
## Overview AG News is a widely-used English news topic classification dataset containing roughly 127,600 news articles (120,000 train / 7,600 test) labeled across 4 balanced topic classes: World, Sports, Business, and Sci/Tech. Each row has a title, description text, and integer label. Format is parquet. The articles were gathered by the ComeToMyHead academic news search engine from 2000+ news sources, with the benchmark subset originally constructed by Xiang Zhang et al. for the 2015 character-level CNN paper. ## Schema - text — string — concatenated news title and description - label — int (ClassLabel) — topic class: 0=World, 1=Sports, 2=Business, 3=Sci/Tech ## Sources - HuggingFace: https://huggingface.co/datasets/fancyzhx/ag_news — license declared as "unknown" on the card, but the original AG corpus is published for academic/research use by ComeToMyHead and the Zhang et al. benchmark split is broadly redistributed across the ML ecosystem. - Original corpus: ComeToMyHead academic news search engine (http://www.di.unipi.it/~gulli/AG_corpus_of_news_articles.html) - Benchmark construction: Zhang, Zhao, LeCun (2015), "Character-level Convolutional Networks for Text Classification" ## Methodology ComeToMyHead aggregated more than one million news articles from 2000+ sources over more than a year of crawling starting in 2004. Zhang et al. selected the 4 largest topic classes from this corpus and sampled 30,000 training and 1,900 test examples per class to produce the balanced benchmark distribution that is mirrored here. Text is the raw title + description concatenation with minimal normalization. ## Known gaps & limitations Articles date from roughly 2004-2005, so topical vocabulary, named entities, and world events are stale relative to modern news. English-only. The 4-class taxonomy is coarse and collapses many subtopics. License is declared "unknown" on the HF card — buyers redistributing commercially should confirm acceptable use with the original ComeToMyHead terms. Likely heavy overlap with pretraining corpora of most modern LLMs, so zero-shot numbers on AG News overstate generalization. ## Intended use & out-of-scope - For: training and evaluating text classifiers, fine-tuning small LMs for topic tagging, distillation targets, NLP coursework, quick smoke-tests of classification pipelines. - Not for: contemporary news topic systems (data is ~20 years old), benchmarking frontier LLMs without leakage controls (this dataset is almost certainly in their pretraining), or any task requiring fine-grained subtopics beyond the 4 classes. _Federated dataset: 2 parquet shards, 18.9 MB total. Queries and downloads stream through the DataBazaar API._ Original supplier listing: AG News - Topic Classification Benchmark Classic 4-class news topic classification dataset (~127K articles across World, Sports, Business, Sci/Tech). Standard benchmark for text classification, fine-tuning, and NLP evals.

Schema

NameTypeDescription
textVARCHARConcatenated news article title and description text.
labelBIGINTTopic class: 0=World, 1=Sports, 2=Business, 3=Sci/Tech.

Sample Data

Preview a sample of the data before downloading.

Public sample only. Sign in to retrieve the full dataset, including free datasets.

For AI Agents

Via MCP Server
# 1. Add to your agent's MCP config (claude_desktop_config.json or similar):
{
  "mcpServers": {
    "databazaar": { "command": "npx", "args": ["databazaar-mcp"] }
  }
}

# 2. Your agent can then call:
search_datasets({ query: "AG News Topic Classification B" })
// Found: f14329c0-7c5b-4f9f-9c43-3d2a5ef71b1a
get_download_url({ dataset_id: "f14329c0-7c5b-4f9f-9c43-3d2a5ef71b1a" })  // free — sign in with MCP OAuth first
Via REST API
# Free dataset — sign in or use your account API key:
curl https://api.databazaar.io/datasets/f14329c0-7c5b-4f9f-9c43-3d2a5ef71b1a/download-url -H "Authorization: Bearer $DATABAZAAR_API_KEY"