You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

AfriXIR Passage Retrieval with Hard Negatives

Dataset Summary

AfriXIR-Passage-Retrieval-With-Negatives is a large-scale, multilingual passage retrieval dataset designed for training and evaluating information retrieval systems across eight African languages. The dataset contains 313,592 training examples and 34,849 test examples, with each example consisting of a query-passage pair accompanied by 16 hard negative passages mined through semantic similarity.

This dataset enables the development of robust cross-lingual and multilingual retrieval models for underrepresented African languages, addressing the critical need for information retrieval resources in low-resource language settings.

Languages Covered

The dataset includes eight African languages from diverse language families:

Language ISO Code Train Examples Test Examples % of Dataset
Swahili sw 76,288 8,477 24.3%
Hausa ha 68,526 7,614 21.9%
Amharic am 61,469 6,832 19.6%
Yoruba yo 32,728 3,637 10.4%
Somali so 29,755 3,307 9.5%
Shona sn 17,010 1,890 5.4%
Zulu zu 14,620 1,625 4.7%
Oromo om 13,196 1,467 4.2%

Total: 313,592 train + 34,849 test = 348,441 query-passage pairs

Data Collection Methodology

Source Datasets

The dataset was constructed through a weak supervision approach by aggregating and repurposing multiple publicly available datasets. Query-passage pairs were extracted from:

  1. News Articles (MasakhaNEWS, AfriCast, DSFSI News)
  • Headlines → Full article text pairs
  • Available for: All 8 languages
  • Provides real-world journalistic content
  1. XL-SUM Summarization Dataset
  • Summaries → Full text pairs
  • Available for: Amharic, Hausa, Oromo, Somali, Swahili, Yoruba, Zulu
  • High-quality editorial content
  1. Wikipedia Articles
  • Title → Article content pairs
  • Available for: All 8 languages
  • Filtered by length (100-1000 characters)
  • Encyclopedic knowledge coverage
  1. Question-Answer Datasets (AfriQA, KenSwQuAD)
  • Questions → Context passages
  • Available for: Hausa, Swahili, Yoruba, Zulu
  • Natural information-seeking queries
  1. CIRAL Corpus
  • Repurposed pre-existing passages into query-passage pairs
  • Available for: Hausa, Somali, Swahili, Yoruba
  1. Amharic Passage Retrieval Dataset V2 (Ras Yosef, 2024)
  • Pre-built query-passage pairs with hard negatives
  • Available for: Amharic
  • News, XL-SUM, Wikipedia, and QA sources

Hard Negative Mining

Hard negatives are crucial for training discriminative retrieval models. Following the methodology established in Amharic-Passage-Retrieval-Dataset-V2-With-Negatives, for each query-passage pair:

  1. Embedding Generation: All passages in the dataset were embedded using sentence-transformers/paraphrase-multilingual-mpnet-base-v2
  2. Similarity Computation: Cosine similarity was computed between the query embedding and all passage embeddings
  3. Hard Negative Selection: The top-16 most similar passages (excluding the positive passage) were selected as hard negatives
  4. Score Retention: Each negative passage includes its cosine similarity score

Data Splitting

  • Train/Test Split: 90% / 10% stratified by language and source
  • Random Seed: 42 (for reproducibility)
  • Minimum Examples per Source: Ensured adequate representation from each source dataset

Acknowledgments

We gratefully acknowledge the creators of the source datasets that made this work possible:

  • MasakhaNEWS: Adelani et al. (2023)
  • XL-SUM: Hasan et al. (2021)
  • AfriQA: Ogundepo et al. (2023)
  • CIRAL: Nair et al. (2022)
  • Wikipedia: Wikimedia Foundation
  • Amharic Passage Retrieval Dataset: Ras Yosef (2024)
  • AfriCast/KenSwQuAD: Various contributors

License

This dataset is released under the MIT License. Users are free to use, modify, and distribute this dataset with attribution.

Downloads last month
33