CoolFace
Datasetpublic

Huzayfah-Patel/mindbridge-phq9-hindi-dialogues

MindBridge Hindi PHQ-9/GAD-7 — Training Dialogues (2,883 rows) Single-turn ShareGPT-format dialogues for Unsloth QLoRA fine-tuning of Gemma 4 E2B. Each row: [system, user, assistant.tool_calls] where the assistant emits interpret_response({score: int 0-3, rationale_english: str, confidence: float in {0.6, 0.8, 0.95}}). Compatible with tokenizer.apply_chat_template(messages, tools=[INTERPRET_RESPONSE_TOOL_SCHEMA]) for Gemma 4 native <|tool_call> tokens. The tool schema lives in… See the full description on the dataset page: https://huggingface.co/datasets/Huzayfah-Patel/mindbridge-phq9-hindi-dialogues.

sourceHugging Facecc-by-4.0updated 1mo agoView on Hugging Face
0likes35downloads
Dataset Card

MindBridge Hindi PHQ-9/GAD-7 — Training Dialogues (2,883 rows)

Single-turn ShareGPT-format dialogues for Unsloth QLoRA fine-tuning of Gemma 4 E2B. Each row: [system, user, assistant.tool_calls] where the assistant emits interpret_response({score: int 0-3, rationale_english: str, confidence: float in {0.6, 0.8, 0.95}}). Compatible with tokenizer.apply_chat_template(messages, tools=[INTERPRET_RESPONSE_TOOL_SCHEMA]) for Gemma 4 native <|tool_call> tokens.

The tool schema lives in tools/build_training_dataset.py::INTERPRET_RESPONSE_TOOL_SCHEMA in the upstream repository — single source of truth shared with the deployed iOS app's inference path.

Composition (2,883 rows)

  • —~2,763 teacher expansions (Gemma 4 26B-A4B MoE via Vertex MaaS streaming; 98.8% mechanical pass rate on JSON + schema + Devanagari validation)
  • —120 hand-authored routine seeds (companion dataset mindbridge-phq9-hindi-seeds)
  • —0 Item-9 extras in training — all 24 moved to held-out as the safety-gate adversarial slice per locked Option B split

Persona distribution

1:1:1 across postnatalmother / olderwoman / man (Indian rural-clinic context). Persona is OMITTED from user-message content so inference is persona-blind — the model reads intensity from the utterance, not from a tag.

Schema

JSONL. Each row:

json
{
  "messages": [
    {"role": "system", "content": "..."},
    {"role": "user", "content": "<scale + item context>\n<Hindi utterance>"},
    {"role": "assistant", "tool_calls": [{"type": "function", "function": {"name": "interpret_response", "arguments": {...}}}]}
  ],
  "metadata": {"source": "teacher" | "seed" | "item9_extra", "scale": "phq9" | "gad7", "item_num": int, "persona_id": str, "example_id": str, ...}
}

Quality assurance

  • —Phase B mechanical validation: 98.8% pass (37 rationale_too_short rejections)
  • —Phase D dad-portion Hindi-authenticity review: 30/30 stratified random rows reviewed verbatim; 0 rejections (Hindi quality verified)
  • —Phase D builder spot-check (clinical W/D/J): 50-row sample reviewed; 3 score corrections applied (rationale rewritten); 0 rejections

Known limitations

  • —Builder W/D/J review sampled (50 / 2,963 = 1.7%); full clinical review deferred to v1.1
  • —Single-clinician review (no multi-rater reliability study)
  • —See mindbridge-phq9-hindi-evaluation dataset card for in-distribution caveat on the held-out 200 main rows

Teacher expansion methodology

Synthetic training data was generated by Gemma 4 26B-A4B-IT MoE (Mixture-of-Experts; 26B total / 4B active per forward pass; Google DeepMind's April 2026 Gemma 4 release) accessed via Vertex AI's Model-as-a-Service streaming endpoint (gemma-4-26b-a4b-it-maas on location=global). 120 cells (3 personas × 4 Likert × 10 PHQ-9 + GAD-7 items, with cell omissions per coverage matrix) × 25 expansions = 3,000 candidate utterances. Wall time ~25 min; cost ~$0.17 metered against the Vertex MaaS free trial.

MMR-diversified in-context seed selection

Each generation call uses 7 in-context seed examples drawn from the companion mindbridge-phq9-hindi-seeds dataset, selected via Maximal Marginal Relevance (MMR) with λ=0.65 (weight on relevance vs diversity) using `sentence-transformers/paraphrase-multilingual-mpnet-base-v2` for cross-lingual semantic embedding. Pool filtered to persona-strict (only same-persona seeds eligible for selection) before MMR ranking — ensures persona voice transfers to expansions without the teacher having to reason about persona.

Teacher prompt constraint clauses (U/W/C/D/J gate baked into prompt)

The teacher prompt forces 5 constraints on every generated utterance:

[U] NATURAL HINDI. Use the persona's rural register. Do NOT use
    Delhi/urban Hindi. Do NOT use literal-translation phrases from
    English textbooks. When in doubt, prefer how a real ASHA-visited
    patient in <persona location> would actually speak.

[W] CLINICAL CORRECTNESS. The utterance must clinically map to the
    target Likert (L0 = 0-1 of 14 days; L1 = 2-6; L2 = 7-11;
    L3 = 12-14).

[C] CULTURAL AUTHENTICITY. Persona-specific framing per persona voice
    note:
      - postnatal_mother (rural UP, Awadhi tinge): mild English code-
        switch allowed (tension, baby, tablet); reluctant to name
        "depression" directly; postpartum context (3-9 month baby).
      - older_woman (Vaishali Bihar, Bhojpuri tinge): heavy somatic
        language for psychological symptoms (सिर भारी रहता है, कमज़ोरी,
        बदन दर्द); rarely uses English.
      - man (Kanpur Dehat UP): financial English (loan, EMI, tension);
        gendered non-disclosure — does NOT directly say उदास हूँ.
    Forbid Western idiom transplants such as "I feel down" →
    "उदास महसूस करता हूँ".

[D] STYLISTIC DIVERSITY. Generate N variants that DIFFER from each
    other in phrasing, sentence length, emotional register, and
    vocabulary. Do NOT lexically copy the in-context seeds.

[J] JSON OUTPUT FORMAT. Return ONLY a valid JSON array with exactly
    these 5 keys per object: patient_utterance_hindi (Devanagari),
    patient_utterance_english_gloss (literal translation),
    target_score (int matching Likert), target_rationale_english
    (10-25 words clinical sentence), target_confidence (∈ {0.6, 0.8,
    0.95} — NEVER 0.7, 0.85, 0.9).

Full canonical template lives at `tools/build_phase_b_prompts.py::TEACHER_PROMPT_TEMPLATE` in the upstream repository.

Validation gate (98.8% mechanical pass)

A post-generation tools/validate_phase_b.py gate checked: required fields present + score in {0,1,2,3} + confidence in {0.6, 0.8, 0.95} + rationale word count 5-30 + Devanagari character presence. 2,963 of 3,000 candidates passed (98.8%); only 37 rejections, all rationale_too_short (teacher emitted curt rationales <5 words on a few items). Zero rejections on score / confidence / missing-field / long- rationale / Devanagari character checks.

License

CC-BY 4.0

Authorship & consent

Co-authored by Huzayfah Patel (UK-registered psychiatrist + software engineer) and Nazir Patel (native Hindi reader/writer + co-contributor; named with explicit consent). No real patient data is included in any artifact in this collection.

Ethics & responsible AI

  • —Synthetic clinical vignettes only. All Hindi utterances are authored by Nazir Patel (Phase A direct dictation via SuperWhisper Scribe with cloud LLM post-process) or generated by a Gemma 4 26B-A4B MoE teacher (Phase B teacher expansion). No real patient data, no real clinical encounters, no de-identified records.
  • —IRB review not required under FDA / NHS digital-health responsible-AI norms — synthetic-data + no human-subjects research exemption applies. Documented in the upstream repository's dataset card per project specification.
  • —Native-speaker consent. Nazir Patel is named with explicit permission to credit. His contribution is foundational to the dataset's Hindi quality: hand-dictated 144 seeds (Phase A) + voiced 30 OIWER audio fixtures (Phase A Friday) + reviewed 30 stratified random rows for Hindi authenticity (Phase D, 0/30 rejection).
  • —Clinical-deployment caveat. This dataset is NOT validated for clinical deployment. Production use in India would require: (a) multi-clinician inter-rater reliability study; (b) ASHA field testing with usability + clinical-outcome measurement; (c) CDSCO/DCGI regulatory review per India Medical Devices Rules 2017. Treat all artifacts in this collection as a research demonstration submitted to the Gemma 4 Good Hackathon, not as a deployable clinical tool.
  • —Safety architecture beyond the LLM. The companion iOS app handles Item-9 (suicidality) via a deterministic rule engine layered on top of the fine-tuned LLM — the model is one signal in a defense-in-depth pipeline, NOT the sole safety net. Mandatory Tele MANAS 14416 + KIRAN 1800-599-0019 helpline blocker screen ships with every Item-9 positive regardless of the LLM's confidence. Marginal-improvement policy pre-specified: sub-threshold Likert improvement (6-9pp delta) → drop the fine-tune and ship the base model honestly.

Medical references

This work draws on the following clinical-screening + India-deployment precedents:

  • —PHQ-9 Hindi validation — Kochhar PH, Rajadhyaksha SS, Suvarna VR. Translation and validation of brief patient health questionnaire against DSM IV as a tool to diagnose major depressive disorder in Indian patients. J Postgrad Med. 2007 Apr-Jun;53(2):102-7. PMID: 17495375. DOI: 10.4103/0022-3859.32209.
  • —PHQ-9 + GAD-7 cross-cultural India applicability — De Man J, Absetz P, Sathish T, et al. Are the PHQ-9 and GAD-7 Suitable for Use in India? A Psychometric Analysis. Front Psychol. 2021;12:676398. PMID: 34054677. DOI: 10.3389/fpsyg.2021.676398.
  • —WHO mhGAP Intervention Guide v2.0 (2016) — World Health Organization. mhGAP Intervention Guide for mental, neurological and substance use disorders in non-specialized health settings — Version 2.0. Geneva: WHO; 2016. Link. Paired with the 2023 mhGAP guideline update (third iteration of underlying evidence-based recommendations). Link.
  • —SMART Mental Health (ASHA-administered screening RCT) — Maulik PK, Devarapalli S, Kallakuri S, et al. Mental Health Care Support in Rural India: A Cluster Randomized Clinical Trial. JAMA Psychiatry. 2024;81(11):1061-1070. PMID: 39141399. DOI: 10.1001/jamapsychiatry.2024.2305. ASHAs trained to administer PHQ-9 + GAD-7 via tablets across 44 PHCs in Andhra Pradesh + Haryana; ~170,000 adults screened.
  • —ASHABot (LLM chatbot for community health workers) — Ramjee P, Chhokar M, Sachdeva B, et al. ASHABot: An LLM-Powered Chatbot to Support the Informational Needs of Community Health Workers. In: Proceedings of CHI '25. April 2025. arXiv:2409.10913. Microsoft Research India + Khushi Baby (Rajasthan deployment).
  • —Pfizer PHQ-9 + GAD-7 licensing — per phqscreeners.com: "All PHQ, GAD-7 screeners and translations are downloadable from this website and no permission is required to reproduce, translate, display or distribute them." Hindi translation hosted under same free-use terms. Developed by Drs. Spitzer, Williams, Kroenke with an educational grant from Pfizer Inc.

Citation

bibtex
@misc{patel2026mindbridge,
  title  = {MindBridge: Hindi-first PHQ-9/GAD-7 Screening with Gemma 4 E2B},
  author = {Patel, Huzayfah and Patel, Nazir},
  year   = {2026},
  url    = {https://github.com/HP-00/MindBridge-Gemma-4},
  note   = {Gemma 4 Good Hackathon submission}
}

Project context

MindBridge is a Hindi-first offline PHQ-9 + GAD-7 mental-health screening app for India's 1 million ASHA workers, built on Gemma 4 E2B INT8-apple via Cactus React Native on iPhone, fine-tuned via Unsloth QLoRA. Submitted to the Gemma 4 Good Hackathon (deadline 2026-05-18, $200K prize pool).