# MetisCraft data registry (design §4.2).
# Revisions were pinned and checked on 2026-11-04; evidence and licence notes are in
# docs/research/datasets.md.
#
# splits maps a role to an upstream split. Roles: train, val, calib, dev, test, eval_only.
#   - calib / dev given explicitly are used as is;
#   - otherwise a `val` split is halved into calib and dev by content hash;
#   - otherwise calib and dev are each carved from train (carve_fraction, default 0.05).
# converter: null means the dataset is registered but has no v0.1 converter yet.

datasets:
  boolq:
    tier: must
    hf: google/boolq@35b264d03638db9f4ce671b711558bf7ff0f80d5
    files: [README.md, "data/*.parquet"]
    judgment: noul
    converter: boolq
    license: cc-by-sa-3.0
    terms: [share_alike]
    splits: {train: train, test: validation}
    lineage: {family: boolq}

  banking77:
    tier: must
    hf: PolyAI/banking77@1846984189f2bc0ac51c6fc3a600fa9e1714e0c6
    files: [README.md, "data/*.parquet"]
    judgment: choice
    converter: text_choice
    license: cc-by-4.0
    terms: [attribution]
    splits: {train: train, test: test}
    lineage: {family: intent-banking77, in_decision_index: BANKING77}
    params:
      text_field: text
      label_field: label
      instructions: Which intent does this online-banking customer message express?

  clinc150:
    tier: must
    hf: clinc/clinc_oos@155b9c710419136e17307b80d0a13e68cd46b4ec
    config: plus
    files: [README.md, "plus/*.parquet"]
    judgment: choice
    converter: text_choice
    license: cc-by-3.0
    terms: [attribution]
    splits: {train: train, val: validation, test: test}
    lineage: {family: intent-clinc, in_decision_index: CLINC150+OOS}
    params:
      text_field: text
      label_field: intent
      null_label: oos
      instructions: Which intent does this user request express? Answer null if none of the intents fits.

  sst5:
    tier: must
    hf: SetFit/sst5@e51bdcd8cd3a30da231967c1a249ba59361279a3
    files: [README.md, "*.jsonl"]
    judgment: score
    converter: sst5
    license: unspecified
    terms: [license_unspecified, research_only]
    splits: {train: train, val: dev, test: test}
    lineage: {family: sst}
    params:
      instructions: How positive is the sentiment of this movie-review sentence?
      levels: [very negative, negative, neutral, positive, very positive]

  go_emotions:
    tier: must
    hf: google-research-datasets/go_emotions@add492243ff905527e67aeb8b80c082af02207c3
    config: simplified
    files: [README.md, "simplified/*.parquet"]
    judgment: multi_label
    converter: text_multilabel
    license: apache-2.0
    terms: [pii_possible]
    splits: {train: train, val: validation, test: test}
    lineage: {family: emotion-goemotions}
    params:
      text_field: text
      labels_field: labels
      id_field: id
      instructions: Which emotions does this Reddit comment express?

  nfcorpus:
    tier: must
    hf: BeIR/nfcorpus@b5026a0e96e8a7ac4f95f482a596389289d46269
    extra_sources: {qrels: BeIR/nfcorpus-qrels@a451b3b26d3ae1358f259c1a3a4dd61fcea35a65}
    judgment: ranking
    converter: null
    license: cc-by-sa-4.0 on the Hub; the upstream project page states free use for academic purposes
    terms: [research_only, share_alike]
    lineage: {family: beir-nfcorpus}

  open_jev:
    tier: must
    hf: ZefanCai/Open-Jev@c67699e13d0ae25e35b77165a4b6b079bedc8aba
    config: release-v2-redistributable
    files: [README.md, LICENSE-DATA, "data/release-v2-redistributable/*.parquet"]
    judgment: [noul, choice, score]
    converter: open_jev
    license: cc0-1.0 (generated content only)
    terms: [third_party_text_unverified]
    splits: {train: train, calib: calibration, dev: validation, test: test, eval_only: ood}
    lineage: {family: open-jev, task_family_overlap: [typed_decisions]}

  typed_decisions:
    tier: must
    hf: LocalLLaMA/typed-decisions@c9e8c4167bf9b47edfcba3b9580e69bddd8d9e5a
    config: all
    files: [README.md, "all/*.parquet"]
    judgment: [noul, choice, score]
    converter: jev_requests
    license: apache-2.0
    terms: [teacher_unknown, eval_only_no_train]
    # Gold labels are an undisclosed teacher's averaged samples, so the train split is only
    # used to fit calibration and the test split to evaluate.
    splits: {calib: train, test: test}
    lineage: {family: typed-decisions, task_family_overlap: [open_jev]}

  tasksource_jev:
    tier: must
    hf: tasksource/tasksource-jev-typed-decisions@8df2e5c9a33f19a2c2b8febf291c3acb0a91a8a8
    config: default
    files: [README.md, "data/*.parquet"]
    judgment: [noul, choice, score]
    converter: tasksource_jev
    license: other (per-row licence fields)
    terms: [mixed_per_row]
    splits: {train: train, val: validation, test: test}
    lineage:
      family: tasksource
      overlaps: ["chaos-mnli-ambiguity/votes duplicates multi_nli validation_matched"]
      shares_upstream_with: [decision_index_public, banking77, clinc150, boolq, sst5, go_emotions]
    params:
      train_filter: {license_use: [commercial]}
      eval_filter: {variant: [direct]}

  multi_nli:
    tier: optional
    hf: nyu-mll/multi_nli@da70db2af9d09693783c3320c4249840212ee221
    files: [README.md, "data/*.parquet"]
    judgment: choice
    converter: pair_choice
    license: cc-by-3.0, cc-by-sa-3.0, mit, other (mixed by genre)
    terms: [mixed_per_row, share_alike]
    splits: {train: train, test: validation_matched, eval_only: validation_mismatched}
    lineage: {family: nli-mnli, overlaps: ["tasksource chaos-mnli-ambiguity/votes = validation_matched"]}
    params:
      first_field: premise
      second_field: hypothesis
      label_field: label
      instructions: Does the premise entail the hypothesis, contradict it, or neither?
      option_texts:
        entailment: The hypothesis follows from the premise.
        neutral: The hypothesis may or may not be true given the premise.
        contradiction: The hypothesis contradicts the premise.

  ag_news:
    tier: optional
    hf: fancyzhx/ag_news@eb185aade064a813bc0b7f42de02595523103ca4
    files: [README.md, "data/*.parquet"]
    judgment: choice
    converter: text_choice
    license: unknown on the Hub; the card allows academic research and other non-commercial use
    terms: [non_commercial, license_unspecified]
    splits: {train: train, test: test}
    lineage: {family: ag-news}
    params:
      text_field: text
      label_field: label
      instructions: Which topic does this news article belong to?

  ms_marco_v1_1:
    tier: optional
    hf: microsoft/ms_marco@a47ee7aae8d7d466ba15f9f0bfac3b3681087b3a
    config: v1.1
    judgment: ranking
    converter: null
    license: unspecified on the Hub; upstream terms allow non-commercial research only
    terms: [non_commercial]
    lineage: {family: msmarco, appears_in: [ragtruth]}

  lex_glue_eurlex:
    tier: optional
    hf: coastalcph/lex_glue@c23fdff1a6bf74e0e1a71cb86f1e781d37da888c
    config: eurlex
    judgment: multi_label
    converter: null
    license: cc-by-4.0
    terms: [attribution]
    lineage: {family: eurlex, same_docs_as: ["multi_eurlex:en"]}

  civil_comments:
    tier: optional
    hf: google/civil_comments@f2970eb3a55777454c94069077cc8d9b5866312d
    judgment: multi_label
    converter: null
    license: cc0-1.0
    terms: [soft_attributes]
    lineage: {family: civil-comments}

  decision_index_public:
    tier: eval_only
    git: apolinario/decision-index@25c6ec7b6b5f44a216c63c3a700de3a9c6d6699d
    judgment: [choice, noul]
    converter: null
    license: per upstream (ANLI is CC BY-NC 4.0; RAGTruth MS MARCO contexts are non-commercial; Yelp contexts may not be redistributed); code MIT
    terms: [eval_only_no_train, non_commercial, mixed_per_row]
    lineage: {family: di-public, shares_upstream_with: [tasksource_jev]}

  # ---------------------------------------------------------------- example vertical scenario
  # A worked example of turning a labelled public dataset into business questions: each
  # Banking77 message answers "which support queue?" (choice) and "is it urgent?" (noul).
  # The mapping is illustrative and does not describe any real bank's process.
  banking77_support:
    tier: optional
    hf: PolyAI/banking77@1846984189f2bc0ac51c6fc3a600fa9e1714e0c6
    files: [README.md, "data/*.parquet"]
    judgment: [choice, noul]
    converter: label_mapping
    license: cc-by-4.0
    terms: [attribution]
    splits: {train: train, test: test}
    lineage: {family: intent-banking77, derived_from: banking77}
    params:
      text_field: text
      label_field: label
      questions:
        queue:
          type: choice
          instructions: Which support queue should handle this customer message?
          criteria:
            cards: Ordering, delivering, activating, linking or replacing cards; PINs, card limits and card support.
            payments: Card payments, cash withdrawals, refunds, fees, exchange rates and currencies.
            transfers: Sending and receiving money, transfer status, cancellations and beneficiaries.
            top_up: Topping up the account and problems with top-ups or deposits.
            account: Identity verification, personal details, passcodes, age limits and closing the account.
            security: Lost, stolen or compromised cards or phones, and transactions the customer does not recognise.
          map:
            cards: [activate_my_card, card_about_to_expire, card_acceptance, card_arrival, card_delivery_estimate,
                    card_linking, card_not_working, change_pin, contactless_not_working, disposable_card_limits,
                    get_disposable_virtual_card, get_physical_card, getting_spare_card, getting_virtual_card,
                    order_physical_card, pin_blocked, virtual_card_not_working, visa_or_mastercard,
                    apple_pay_or_google_pay, supported_cards_and_currencies, card_swallowed, atm_support]
            payments: [card_payment_fee_charged, card_payment_wrong_exchange_rate, cash_withdrawal_charge,
                       declined_card_payment, declined_cash_withdrawal, exchange_charge, exchange_rate,
                       exchange_via_app, extra_charge_on_statement, fiat_currency_support, pending_card_payment,
                       pending_cash_withdrawal, "reverted_card_payment?", wrong_amount_of_cash_received,
                       wrong_exchange_rate_for_cash_withdrawal, transaction_charged_twice, request_refund,
                       Refund_not_showing_up, country_support]
            transfers: [balance_not_updated_after_bank_transfer, beneficiary_not_allowed, cancel_transfer,
                        declined_transfer, failed_transfer, pending_transfer, receiving_money,
                        transfer_fee_charged, transfer_into_account, transfer_not_received_by_recipient,
                        transfer_timing]
            top_up: [automatic_top_up, balance_not_updated_after_cheque_or_cash_deposit, pending_top_up,
                     top_up_by_bank_transfer_charge, top_up_by_card_charge, top_up_by_cash_or_cheque,
                     top_up_failed, top_up_limits, top_up_reverted, topping_up_by_card, verify_top_up]
            account: [age_limit, edit_personal_details, passcode_forgotten, terminate_account,
                      unable_to_verify_identity, verify_my_identity, verify_source_of_funds, why_verify_identity]
            security: [compromised_card, lost_or_stolen_card, lost_or_stolen_phone, card_payment_not_recognised,
                       cash_withdrawal_not_recognised, direct_debit_payment_not_recognised]
        urgent:
          type: noul
          instructions: Could the customer lose money or access to their account if this message waits until tomorrow?
          true_for: [compromised_card, lost_or_stolen_card, lost_or_stolen_phone, card_payment_not_recognised,
                     cash_withdrawal_not_recognised, direct_debit_payment_not_recognised, card_swallowed,
                     transaction_charged_twice, pin_blocked, wrong_amount_of_cash_received]

  # ---------------------------------------------------------------- reproductions
  # Sources of public projects rebuilt with MetisCraft (docs/reproductions/).
  # Tev1 pins this copy of Banking77. Its rows (text, label, order) and class names equal
  # PolyAI/banking77 above (checked 2026-11-06); the parquet files and the card differ.
  banking77_legacy:
    tier: optional
    hf: legacy-datasets/banking77@f54121560de48f2852f90be299010d1d6dc612ec
    files: [README.md, "data/*.parquet"]
    judgment: choice
    converter: text_choice
    license: cc-by-4.0
    terms: [attribution]
    splits: {train: train, test: test}
    lineage: {family: intent-banking77, used_by: [tev1]}
    params:
      text_field: text
      label_field: label
      instructions: Which intent does this online-banking customer message express?

  # Tev1-4B-experimental's training data, rebuilt by its own builders at the pinned commit and
  # accepted only if every published hash matches (docs/reproductions/tev1.md). The splits
  # follow Tev1: train is new-v1 train; new-v1 dev is halved into calib and dev; test and
  # eval_only are the 1,000 decision and 300 policy-transfer items its results were reported on.
  tev1:
    tier: optional
    git: togethercomputer/tev1@1dde7782382c9f49d627153759b8d1deab426ce0
    files:
      - "data/new-v1/**/*"
      - data/v1/manifest.json
      - "data/v1/*/test.jsonl"
      - "data/v1/*/policy_transfer.jsonl"
    judgment: [choice, score]
    converter: tev1
    license: builders MIT; each public row keeps its source's terms (MultiNLI mixed, BoolQ CC BY-SA 3.0, Banking77 CC BY 4.0, AG News non-commercial, SST-5 unspecified); the synthetic rows come from the builders
    terms: [non_commercial, license_unspecified, research_only, share_alike, attribution, mixed_per_row]
    splits: {train: new-v1/train, val: new-v1/dev, test: v1/test, eval_only: v1/policy_transfer}
    lineage: {family: tev1, built_from: [multi_nli, boolq, banking77_legacy, ag_news, sst5]}
    params:
      build:
        inputs:
          datasets:
            nyu-mll/multi_nli: multi_nli
            google/boolq: boolq
            legacy-datasets/banking77: banking77_legacy
            fancyzhx/ag_news: ag_news
            SetFit/sst5: sst5
          tokenizers:
            # Tev1 locks transformers 5.17.0, which loads Qwen3.5's tokenizer as the
            # Qwen2Tokenizer its Hub config names; later releases use Qwen3_5Tokenizer. The two
            # split text differently only around combining marks, so two BoolQ rows count 2 and
            # 8 tokens more in Tev1's records than under the newer class.
            Qwen/Qwen3.5-2B: {weights: qwen3.5/2b, class: Qwen2Tokenizer}
        steps:
          - [build_dataset.py]
          - [validate_dataset.py, data/v1]
          - [build_v2.py]
          - [validate_v2.py, data/v2]
          - [build_v21.py]
          - [validate_v21.py, data/v2.1]
          - [build_new_v1.py]
        # Every hash Tev1 published: the final files, the v1 and v2.1 files they are built
        # from, and the two evaluation sets.
        verify:
          - {manifest: runs/new-v1/reproduction.json, key: files, root: data/new-v1}
          - {manifest: runs/new-v1/dataset-manifest.json, key: input_hashes, root: data}
          - manifest: runs/new-v1/evaluation.json
            key: hashes
            files: {test: data/v1/records/test.jsonl, policy_transfer: data/v1/records/policy_transfer.jsonl}
