Datasets:
Modalities:
Text
Sub-tasks:
semantic-similarity-classification
Languages:
English
Size:
< 1K
License:
| language: | |
| - en | |
| license: cc-by-sa-4.0 | |
| task_categories: | |
| - text-retrieval | |
| - sentence-similarity | |
| task_ids: | |
| - semantic-similarity-classification | |
| tags: | |
| - dogs | |
| - dog-breeds | |
| - retrieval | |
| - n-tuple | |
| - hard-negatives | |
| - sentence-transformers | |
| - wikipedia | |
| pretty_name: Dog Breed N-Tuple Retrieval Dataset | |
| size_categories: | |
| - 1K<n<10K | |
| source_datasets: | |
| - Wikipedia (en) | |
| # Dog Breed N-Tuple Retrieval Dataset | |
| A hard-negative-mined **n-tuple** dataset for training and evaluating | |
| sentence embedding / bi-encoder retrieval models on dog-breed knowledge. | |
| ## Dataset construction | |
| 1. **Source**: English Wikipedia articles for 60+ dog breeds | |
| (popular/AKC breeds + recognized Indian breeds). | |
| 2. **Sections captured**: Appearance, Temperament, Health, History, Care, | |
| Characteristics, and article summaries — extracted recursively so nested | |
| subsections are not missed. | |
| 3. **Anchor generation**: Up to 2 paraphrased query templates per passage | |
| (e.g. *"What is the temperament of the Labrador Retriever?"*). | |
| 4. **Hard-negative mining**: FAISS-backed TopK mining with | |
| `sentence-transformers/all-MiniLM-L6-v2`, NV-Retriever-style | |
| positive-aware margin (`relative_margin=0.05`), and a **cross-breed | |
| metadata mask** that forbids negatives from the same breed as the anchor. | |
| 5. **Train / eval split**: held out by *breed* (not by row) so the eval | |
| split measures generalization to unseen breed names. | |
| ## Column schema | |
| | Column | Description | | |
| |---|---| | |
| | `anchor` | Natural-language query about a breed | | |
| | `positive` | Wikipedia passage that answers the query | | |
| | `negative_1` … `negative_5` | Hard-negative passages from different breeds | | |
| ## Splits | |
| | Split | Rows | Breeds | | |
| |---|---|---| | |
| | train | see dataset | ~85 % of breeds | | |
| | eval | see dataset | ~15 % of breeds (held out by breed) | | |
| ## Usage | |
| ```python | |
| from datasets import load_dataset | |
| from sentence_transformers import SentenceTransformer | |
| from sentence_transformers.losses import MultipleNegativesRankingLoss | |
| ds = load_dataset("dorrito-dev/dog-breed-ntuple-retrieval") | |
| train = ds["train"] | |
| ``` | |
| ## License | |
| Derived from Wikipedia content, which is licensed under | |
| [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). | |