fiqa_pl / README.md
jansowa's picture
Upload README.md
ed289ed verified
|
Raw
History Blame Contribute Delete
8.23 kB
metadata
language:
  - pl
  - en
pretty_name: FIQA PL/EN Reranked Hard Negatives
task_categories:
  - sentence-similarity
tags:
  - retrieval
  - text-embeddings
  - hard-negatives
  - reranking
  - fiqa
  - polish
  - english
configs:
  - config_name: pl
    default: true
    data_files:
      - split: train
        path: train_pl.jsonl
  - config_name: en
    data_files:
      - split: train
        path: train_en.jsonl

FIQA PL/EN Reranked Hard Negatives

This dataset contains two aligned JSONL training files for embedding-model fine-tuning:

  • train_pl.jsonl: Polish texts.
  • train_en.jsonl: English texts.

Both files contain the same 5,500 training records in the same order. The text fields (query, pos, neg) are language-specific, while all metadata fields are shared across the aligned Polish and English examples. This means that the same query-document pair has the same IDs, reranker scores, retrieval scores, and selection metadata in both language versions.

The Polish subset is configured as the default Dataset Viewer subset.

Dataset Statistics

Metric Value
Queries per language 5,500
Total positives per language 14,850
Negatives per query 10
Queries with mined synthetic positives 684
Mined synthetic positives 684
Positives with pos_scores_stronger_reranker > 23.50 3,190
Queries with at least one positive above 23.50 2,086
Queries with no positive above 23.50 3,414
Mean neg_scores -3.5121
Mean neg_scores for queries with at least one positive above 23.50 -3.4766

Text Length Statistics

Character lengths are measured in characters. Token lengths include model special tokens and were computed without padding or truncation.

Character Lengths

Language Texts Count Mean Median p90 p95 p97 p99
EN Queries 5,500 61.5 59 92 103 109 124
EN Positive passages 14,850 1,019.7 779 2,050 2,707 3,157 4,389
EN Negative passages 55,000 640.2 409 1,339 2,041 2,598 3,678
PL Queries 5,500 72.4 69 111 124 134 153
PL Positive passages 14,850 1,086.5 840 2,158 2,846 3,319 4,508
PL Negative passages 55,000 683.8 436.5 1,406 2,252 2,798 3,708

Token Lengths

Tokenizer Language Texts Count Mean Median p90 p95 p97 p99
sdadas/mmlw-retrieval-roberta-base EN Queries 5,500 23.5 23 35 39 41 47
sdadas/mmlw-retrieval-roberta-base EN Positive passages 14,850 352.5 270 704 929 1,084 1,515
sdadas/mmlw-retrieval-roberta-base EN Negative passages 55,000 226.1 144 474 725 912 1,277
sdadas/mmlw-retrieval-roberta-base PL Queries 5,500 16.2 15 24 27 30 34
sdadas/mmlw-retrieval-roberta-base PL Positive passages 14,850 221.2 171 438 574 671 934
sdadas/mmlw-retrieval-roberta-base PL Negative passages 55,000 147.2 94 302 469 575 852
sdadas/mmlw-retrieval-roberta-large-v2 EN Queries 5,500 21.1 20 31 34 36 41
sdadas/mmlw-retrieval-roberta-large-v2 EN Positive passages 14,850 310.0 237 618 819 952 1,329
sdadas/mmlw-retrieval-roberta-large-v2 EN Negative passages 55,000 199.5 128 421 642 800 1,142
sdadas/mmlw-retrieval-roberta-large-v2 PL Queries 5,500 15.5 15 23 26 28 31
sdadas/mmlw-retrieval-roberta-large-v2 PL Positive passages 14,850 207.1 161 409 536 623 866
sdadas/mmlw-retrieval-roberta-large-v2 PL Negative passages 55,000 137.1 88 281 438 536 784

Data Construction

This dataset was prepared with the help of lightonai/embeddings-fine-tuning. In the LightOnAI dataset, the authors computed 2,048 document candidates for each query using Alibaba-NLP/gte-modernbert-base. The similarity scores produced by LightOnAI are stored in original_pos_scores and original_neg_scores.

For this prepared FIQA export, candidate query-document pairs were reranked with mixedbread-ai/mxbai-rerank-base-v2. The resulting scores are stored in pos_scores and neg_scores. Reranking was performed until 10 negatives satisfying the selection rules were found for each query. During the same process, if candidate documents met the positive thresholds, they were added as mined positives.

At the end of the pipeline, positives were also scored with BAAI/bge-reranker-v2.5-gemma2-lightweight. These scores are stored in pos_scores_stronger_reranker. This stronger reranker score is intended for quality filtering before training: original datasets can contain query-positive pairs where the positive passage does not actually answer the query, so positives with too-low pos_scores_stronger_reranker values should be removed before model training.

Dataset Structure

Each JSONL row has the following structure:

{
  "query_id": "448",
  "query": "...",
  "pos": ["..."],
  "neg": ["..."],
  "pos_scores": [5.75],
  "neg_scores": [-2.5, -2.5],
  "prompt": "",
  "type": "retrieval"
}

The actual records contain all fields documented below.

Text Fields

Field Description
query Query text in the language of the subset.
pos List of positive passages/documents in the language of the subset.
neg List of negative passages/documents in the language of the subset.

Metadata Fields

Field Description
query_id Query/record identifier used to align the Polish and English versions.
pos_scores Scores for query + positive pairs computed with mixedbread-ai/mxbai-rerank-base-v2.
neg_scores Scores for query + negative pairs computed with mixedbread-ai/mxbai-rerank-base-v2.
prompt Training prompt field; empty in these files.
type Task type; retrieval in these files.
pos_id Document IDs for positives.
neg_id Document IDs for negatives.
pos_is_synthetic Boolean flags indicating whether each positive was mined by the pipeline. false means the positive came from the original FIQA dataset; true means it was mined and should be treated as synthetic.
neg_selection_tier Negative-selection label for each negative. Negatives selected from the 2,048 LightOnAI candidates keep their tier label, such as strict in this export. If the 2,048 candidates did not provide enough valid negatives, additional documents were sampled from the full corpus and the highest-scoring valid ones were added with relaxed_backfill.
original_pos_scores LightOnAI similarity scores for positives, computed with Alibaba-NLP/gte-modernbert-base.
original_neg_scores LightOnAI similarity scores for negatives, computed with Alibaba-NLP/gte-modernbert-base.
pos_scores_stronger_reranker Positive scores computed at the final stage with BAAI/bge-reranker-v2.5-gemma2-lightweight; intended for filtering low-quality positives before training.
mean_neg_score Mean value of neg_scores for the record.
mean_pos_score Mean value of pos_scores for the record.
max_neg_score Maximum value of neg_scores for the record.
difference_between_mean_scores Difference between mean_pos_score and mean_neg_score.
difference_between_max_scores Difference between mean_pos_score and max_neg_score.

Intended Use

The dataset is intended for training and evaluating retrieval or embedding models with query-positive-negative examples. The aligned Polish and English subsets can be used for monolingual training, bilingual comparisons, or multilingual fine-tuning setups.

Before training, consider filtering positives using pos_scores_stronger_reranker to remove weak query-positive pairs.