Shah1st's picture
Update README.md
2a28112 verified
---
license: apache-2.0
language:
- uk
- en
size_categories:
- 10K<n<100K
---
# Pretrain Dataset for Ukrainian Reranker/Embedder (80k EN→UK)
English retrieval dataset with pre-mined hard negatives, designed for translation to Ukrainian and use as a pretraining stage before fine-tuning on competition/domain-specific data.
## Purpose
Stage 1 (pretrain) of a 3-stage training pipeline:
1. **Pretrain** on this dataset (translated to Ukrainian) — teaches general retrieval mechanism
2. **Finetune** on UA-SQuAD — adapts to Ukrainian QA patterns
3. **Finetune** on competition train set — adapts to target domain (UNLP 2026)
## Dataset Summary
| Source | Rows | Avg Positive Length | Negatives/Row | Domain |
|---|---|---|---|---|
| [Natural Questions](https://huggingface.co/datasets/tomaarsen/natural-questions-hard-negatives) | 30,000 | 611 chars | 3 | Wikipedia (broad coverage) |
| [HotpotQA](https://huggingface.co/datasets/sentence-transformers/hotpotqa) | 20,000 | 438 chars | 3 | Wikipedia (multi-hop reasoning) |
| [MS MARCO](https://huggingface.co/datasets/sentence-transformers/msmarco-co-condenser-margin-mse-sym-mnrl-mean-v1) | 20,000 | 348 chars | 1–3 | Web search (diverse queries) |
| [GooAQ](https://huggingface.co/datasets/tomaarsen/gooaq-hard-negatives) | 10,000 | 252 chars | 3 | Google answer boxes (lay explanations) |
| **Total** | **80,000** | **median 372 chars** | | |
## Design Rationale
- **Passage length diversity**: 50-token Google snippets → 300-token multi-paragraph → 2000+ token Wikipedia sections. Matches variable chunking strategies (512-token chunks to full-page chunks).
- **Hard negatives only**: All sources have pre-mined hard negatives from dense retrievers or BM25 — no random/easy negatives.
- **Domain coverage**: Broad encyclopedic (NQ, HotpotQA), web search (MS MARCO), and informal Q&A (GooAQ) to generalize across unseen domains.
## Format
Parquet file with columns:
| Column | Type | Description |
|---|---|---|
| `query` | str | Question or search query (English) |
| `positive` | str | Relevant passage (English) |
| `negative_1` | str | Hard negative passage #1 |
| `negative_2` | str | Hard negative passage #2 (may be empty for some MS MARCO rows) |
| `negative_3` | str | Hard negative passage #3 (may be empty for some MS MARCO rows) |
| `source` | str | Dataset origin: `nq`, `hotpotqa`, `msmarco`, `gooaq` |
## Statistics
```
Total rows: 80,000
Per source:
gooaq : 10000 rows | avg positive length: 252 chars | has neg_1: 100%
hotpotqa : 20000 rows | avg positive length: 438 chars | has neg_1: 100%
msmarco : 20000 rows | avg positive length: 348 chars | has neg_1: 100%
nq : 30000 rows | avg positive length: 611 chars | has neg_1: 100%
Query length: min=5, median=45, max=630
Positive length: min=10, median=372, max=9437
```
## Translation
This dataset is in English. For Ukrainian pretraining, translate using:
- [TranslateGemma-27B](https://huggingface.co/google/translategemma-27b-it) (self-hosted, best quality for EN→UK)
- [Lapa LLM v0.1.2](https://huggingface.co/lapa-llm/lapa-v0.1.2-instruct) (Ukrainian-optimized, efficient tokenizer)
- Claude Haiku 4.5 / GPT-5.4-mini Batch API (commercial alternative)
Translated columns (`query_uk`, `positive_uk`, `negative_1_uk`, etc.) will be added after translation.
## Intended Use
Training bi-encoder (embedding) and cross-encoder (reranker) models for Ukrainian document retrieval, specifically for the [UNLP 2026 Shared Task on Multi-Domain Document Understanding](https://www.kaggle.com/competitions/unlp-2026-shared-task-on-multi-domain-document-understanding).
Compatible with:
- [FlagEmbedding](https://github.com/FlagOpen/FlagEmbedding) training format (convert to `{query, pos, neg}` JSONL)
- [Sentence Transformers](https://sbert.net/) triplet training
- Any contrastive learning framework
## License
This dataset aggregates data from multiple sources. Please refer to the original dataset licenses:
- Natural Questions: [Apache 2.0](https://ai.google.com/research/NaturalQuestions)
- HotpotQA: [CC BY-SA 4.0](https://hotpotqa.github.io/)
- MS MARCO: [MIT](https://microsoft.github.io/msmarco/)
- GooAQ: [Apache 2.0](https://github.com/allenai/gooaq)