Embedding_Bench / README.md
W4ashabii's picture
Add judged near-miss hard negatives to health and gov
1a5e66b verified
|
Raw History Blame Contribute Delete
10.6 kB
metadata
language:
  - ne
license: cc-by-4.0
task_categories:
  - text-retrieval
task_ids:
  - document-retrieval
pretty_name: Nepali Embedding Bench (legal, health, gov)
size_categories:
  - n<1K
tags:
  - nepali
  - retrieval
  - evaluation
  - legal
  - health
  - government
configs:
  - config_name: default
    data_files:
      - split: legal
        path: data/legal-*
      - split: health
        path: data/health-*
      - split: gov
        path: data/gov-*
  - config_name: corpus
    data_files:
      - split: legal
        path: corpus/legal-*
      - split: health
        path: corpus/health-*
      - split: gov
        path: corpus/gov-*

Nepali Embedding Bench

Three Nepali (Devanagari) retrieval sets for evaluating embedding and retrieval models: legal, health and Government of Nepal. Each set is a query file, a corpus of candidate passages and binary relevance judgements. The sets are test only. Please do not train on them.

split queries passages author license
legal 179 1,074 Siddhant Bhattarai CC BY 4.0
health 178 1,593 Siddhant Bhattarai CC BY 4.0
gov 171 1,533 Siddhant Bhattarai CC BY 4.0

Layout

There are two subsets, and each has a legal, a health and a gov split.

default has one row per query, with the passages that go with it:

field description
qid Query id
query The question
domain, subdomain Topic labels
positives Passages that answer the query, as a list of {pid, title, text}. Usually one. 6 legal, 7 health and 11 gov queries have more than one: passages written as negatives for other queries that turned out to answer these.
negatives Hard negatives as {pid, title, text}. Each is on the same topic as the query but does not answer it. Legal has 5 per query. Health and gov have 5 topic negatives plus up to 3 near-miss negatives, 6–8 per query in all.

corpus pools every positive and negative in a split (pid, title, text). Use it to rank each query against the whole split. Scoring each query only against its own row (6–11 passages) is much easier: picking one at random already gets about 12% top-1 on health and gov, and 17% on legal.

from datasets import load_dataset

rows = load_dataset("W4ashabii/Embedding_Bench", split="gov")
corpus = load_dataset("W4ashabii/Embedding_Bench", "corpus", split="gov")
qrels = {r["qid"]: {p["pid"]: 1 for p in r["positives"]} for r in rows}

Passages not listed as a query's positive count as non-relevant.

How the negatives were made

The negatives were written, not mined. For each query, the writer read the query and its positive, plus the other queries in the split. They then wrote on-topic passages about neighbouring facts: a different section of the same Act, a different office, deadline or symptom. Each passage was written so it would not answer that query or any other query in the split. No embedding model or ranker picked them, so the negatives are not biased toward or against any one model. Their length and style match the split's positives. Gov's first two negatives per query were written together with the query, and the other three were added later.

Near-miss negatives (health and gov). The first five negatives rarely reuse the query's words, so health and gov were close to the ceiling (bge-m3 top-1 0.96 and 0.98). Up to three more negatives per query were then written to reuse the query's own words while answering a neighbouring question. Each follows one of three recipes:

  • the same subject with an adjacent question, such as when a TB sputum test is repeated rather than when to get tested;
  • the same question about a sibling subject, such as another vaccine or the district-level office;
  • a look-alike of the positive with the answering sentence replaced.

Every new negative was then judged against its own query, and against any other query where bge-m3 or BM25 ranked it above that query's positive, which came to 1,098 pairs. Two independent passes judged each pair as YES, PARTIAL (part of the answer, or enough to guess it), CONFLICT (a different value for the same fact) or NO. A negative was kept only if both passes said NO for every pair it was in. 15 of the 1,047 written were dropped: 9 health and 6 gov. The verdicts, with both passes' reasons, are in reports/<split>_judge_hard.jsonl. The pids in its jid field come from an earlier packing, so match rows by text.

False-negative check. Two rankers flagged candidates: bge-m3 and BM25, a keyword ranker with no learned model. A passage was flagged when it was in a query's top 3 and scored above the positive under either ranker. Using two unrelated rankers keeps the review from depending on one model. Every flagged candidate was judged, and any that actually answers its query was added to it as an extra positive:

split candidates judged extra positives
legal 375 8
health 116 8
gov 76 11

For legal and gov, and for the health and gov near-miss negatives, two independent judging passes were reconciled, and disagreements got a second look. No negative states a conflicting value for the fact its query asks about. The candidate lists and the confirmed answers are in reports/<split>_falseneg_candidates.jsonl and reports/<split>_falseneg_judged.jsonl.

Negatives are required to be non-answers; they are not required to be true, and were not fact-checked line by line. They were checked for leakage like the rest of the data.

Splits

legal

Everyday legal questions from the public, each paired with the provision that answers it. Domains: property (48), family (46), criminal (45), rights (17), labour (14), consumer (6), business (6). The passage title cites the Act and section.

Source: W4ashabii/legal_QA. The original ids (legal_001…) are kept. The changes from the source:

  • 21 items dropped, so the ids have gaps. 18 ask a question that also appears in a training set (jiban4 or the gov-queries synthetic queries). 3 duplicate another question in the split: legal_116, legal_164 and legal_191 repeat legal_042, legal_126 and legal_147.
  • 27 passages reworded in plain language because their statute wording also appears in the Nepal gov web corpus. Each still states the same provision.

health

Health questions from the public in Nepal, each paired with a passage that answers it, five same-topic negatives and up to three near-miss negatives. Passages are 35–60 words, in the style of a health-post leaflet or FAQ, and every passage in this split was written for it.

Domains: infectious disease (30), maternal and reproductive health (30), non-communicable disease (30), child health including Nepal's immunization schedule (29), mental health (15), health services (15), first aid and injury (15), nutrition and lifestyle (14).

Two items were dropped because they repeated another question in the split. Figures that change over time, such as insurance premiums, helpline numbers and programme details, are dated to 2026. This split is general health information, not medical advice.

Version history. The first health split (v1) was contributed by Sabin Bhattarai (sabin1234/REAL_WEBSITE_TEXT_SCRAP_HEALTH_DOMAIN_DATASET). It was replaced for licensing reasons: its passages were Nepali translations of WHO fact sheets (CC BY-NC-SA 3.0 IGO and WHO website terms), NCBI StatPearls articles (CC BY-NC-ND 4.0) and Harvard Health pages (all rights reserved), and none of these allow open reuse. The current split (v2) reuses no text, questions or passages from v1. It is written by Siddhant Bhattarai and released under CC BY 4.0.

gov

Factual questions about Government of Nepal institutions, services and procedures. They ask which office handles a service, deadlines, eligibility, portals, structure and key dates. Passage ids are shuffled in every split, so an id does not reveal whether its passage is a positive.

The domains follow the Nepal Pixel document taxonomy: administrative_governance (22), identity_civil_registration (19), financial_tax (16), licensing_permits (16), legal_regulatory (15), procurement_contracts (14), education_research (14), land_property (13), electoral (12), social_development (12), disaster_environment (10), agriculture_livestock (8).

This split is a draft. Every pair is being checked by hand against official sources. Fees, thresholds, office names and portal URLs change often, so treat those answers as dated to 2026.

Baseline scores

Each query is ranked against its split's full corpus. Scores are nDCG@10 / top-1. "Before" is the release without the near-miss negatives; legal did not change.

split BM25 bge-m3 multilingual-e5-base
legal 0.567 / 0.441 0.820 / 0.698 0.672 / 0.531
health 0.628 / 0.365 0.923 / 0.837 0.885 / 0.736
health (before) 0.833 / 0.753 0.980 / 0.961 0.962 / 0.910
gov 0.723 / 0.474 0.953 / 0.901 0.884 / 0.737
gov (before) 0.896 / 0.807 0.987 / 0.982 0.974 / 0.942

Leakage checks

Every passage and query was checked against the training sets: the Nepal gov web corpus (voidash/previllage-nepal-gov-corpus, all chunks and document text), Jiban4/Nepali_Law_QA_Dataset, the gov-queries synthetic queries and, for health and gov, the legal set.

  • Lexical check. Text is NFC-normalised and digit-normalised, then compared by exact match, containment and word 5-gram containment against each single reference text. In the released data, no passage reaches 0.5 overlap with any reference text.
  • Semantic check. Each query is compared with every reference question using bge-m3 cosine similarity. Pairs scoring 0.85 or above were checked by hand, and any asking the same fact was dropped. The 6 gov queries still above 0.85 ask a different fact from their match, for example the national bird where the reference asks for the national animal.

The per-split reports and drop lists are in reports/. Other training sets were not checked.

Limitations

  • These are small sets, so per-domain scores are noisy.
  • Only passages flagged by bge-m3 or BM25 were reviewed for being unmarked answers. A passage that answers a query but ranked low under both would still be scored as a miss.
  • Report scores per split; don't average across splits.
  • This dataset is not legal or medical advice.

Citation

TBD