You need to agree to share your Hugging Face information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

Nepali Health FAQ Dataset - Comprehensive Documentation

Dataset Overview

The Merged Nepali Health FAQ Dataset is a large-scale, high-quality multilingual health information resource containing 3,174 question-answer pairs in Nepali language. This dataset is specifically designed for training conversational AI models, information retrieval systems, and question-answering applications focused on health and medical topics.

Key Statistics

Metric Value
Total Records 3,174
Language Nepali (नेपाली)
Script Devanagari (देवनागरी)
License Apache-2.0 (Permissive)
Data Format JSONL (JSON Lines)
Task Type Instruction-Following / Question-Answering
Generation Type Real (Authentic)
Unique Health Domains 3 Major + 20+ Sub-domains
Unique Sources 20+ Medical Organizations & Healthcare Providers
Average Question Length 7.6 words
Average Answer Length 39.9 words

1. BEHAVIOR DIVERSITY ANALYSIS

The dataset includes diverse response behaviors designed to handle different types of health inquiries with varying levels of detail and formality.

Behavior Distribution

Behavior Type Count Percentage Description
जानकारीमूलक उत्तर दिने (Informative Answer) 1,458 45.9% Provides comprehensive, factual health information while maintaining the core meaning and facts of the original answer translated to Nepali
सामान्य जानकारी दिने (General Information) 1,363 42.9% Delivers general health knowledge without excessive technical details
छोटो उत्तर माग्ने (Brief Answer Request) 215 6.8% Concise responses addressing specific health queries
प्रश्नको प्रत्यक्ष उत्तर दिने (Direct Answer) 100 3.2% Direct, straightforward responses to health questions
छोटो र जानकारीमूलक उत्तर दिने (Short & Informative) 38 1.2% Balanced approach combining brevity with informative content

Behavior Insights

  1. Informative vs. General Split: Nearly 89% of responses adopt an informative or general knowledge approach, ensuring users receive substantive health information.

  2. Response Conciseness: About 7% of entries employ brief responses, providing quick answers for straightforward health queries.

  3. Direct Answers: Only 3.2% use purely direct answers, indicating the dataset prioritizes comprehensive information over minimal responses.

  4. Mixed Approaches: A small subset (1.2%) combines brevity with information, offering a balanced middle ground for moderately complex questions.

Use Cases

  • Training conversational agents that provide medically accurate information
  • Building health chatbots with varying response styles
  • Developing QA systems that adapt response length to question complexity
  • Content generation for health education platforms

2. QUESTION PATTERN DIVERSITY ANALYSIS

The dataset encompasses multiple types of health-related questions, each serving different information needs.

Question Type Distribution

Question Type Count Percentage Example Patterns
तथ्यमा आधारित प्रश्न (Fact-Based Questions) 2,831 89.2% "आधारभूत चयापचय दर किन महत्त्वपूर्ण छ?" (Why is basal metabolic rate important?)
प्रश्नोत्तर प्रश्न (Interrogative Questions) 101 3.2% Questions phrased as inquiries requiring verification
स्वास्थ्यसम्बन्धी प्रश्न (Health-Specific Questions) 100 3.2% Specialized health domain questions
प्रश्नोत्तर (Q&A Format) 100 3.2% Structured question-answer pairs
सामान्य प्रश्न (General Questions) 4 0.1% Broad health inquiries
N/A (Unclassified) 38 1.2% Uncategorized entries

Question Pattern Characteristics

Fact-Based Questions (89.2%)

  • Characteristics: Seek objective health information
  • Typical Format: "What is...?", "Why does...?", "How does...?"
  • Examples:
    • "परागकणको स्तर भनेको के हो?" (What is pollen count?)
    • "समयसँगै मेरो आधारभूत चयापचय दर परिवर्तन हुन सक्छ?" (Can my basal metabolic rate change over time?)
    • "दमले मेरो जीवन प्रत्याशामा असर गर्छ?" (Does asthma affect my life expectancy?)

Interrogative Questions (3.2%)

  • Characteristics: Phrased as inquiries requiring yes/no or verification answers
  • Format: Direct questioning of medical concepts
  • Use Case: Training systems for validation-based QA

Health-Specific Questions (3.2%)

  • Characteristics: Domain-specific health terminology
  • Examples: "कोलोरेक्टल क्यान्सरको चरण कस्तो निर्धारण गरिन्छ?" (How is colorectal cancer staged?)

Structured Q&A (3.2%)

  • Characteristics: Pre-formatted question-answer pairs
  • Use Case: Direct fact retrieval systems

Question Complexity Metrics

Metric Value Range
Average Word Count 7.6 words 2-28 words
Minimum Length 2 words Simple queries
Maximum Length 28 words Complex multi-part questions
Median Length ~6 words Typical query

Question Pattern Examples by Complexity

Simple (2-4 words)

  • "के असथेमा घातक हुन्छ?" (Is asthma fatal?)
  • "कोलोन क्यान्सर के हो?" (What is colon cancer?)

Moderate (5-10 words)

  • "मेरो खानपानले आधारभूत चयापचय दरलाई असर गर्छ?" (Does my diet affect basal metabolic rate?)
  • "उर्वर समयावधि भनेको के हो?" (What is the fertile window?)

Complex (15+ words)

  • "तपाईंका लागि घाँसको परागबाट हुने ज्वरोमा प्रयोग गर्ने कुन प्रकारको नाकको छर्काइ उपयुक्त हुन्छ?" (What type of nasal spray is suitable for hay fever treatment for you?)
  • "क्या व्यक्तिगत स्वतन्त्रता भत्ता र अपाङ्गता जीवनयापन भत्ताबीच के फरक छ?" (What is the difference between personal independence payment and disability living allowance?)

3. DOMAIN AND CATEGORY DIVERSITY

Primary Domain Distribution

Domain Count Percentage Description
स्वास्थ्य (Health) 3,036 95.7% Core health and medical topics
एस्थेटिक मेडिसिन (Aesthetic Medicine) 100 3.2% Cosmetic and aesthetic procedures
शिक्षा (Education) 38 1.2% Educational/academic health topics

Category Distribution (Top 10)

Category Count Percentage Focus Area
स्वास्थ्य सम्बन्धी प्रश्नोत्तर (Health Q&A) 1,235 38.9% General health Q&A
स्वास्थ्यसम्बन्धी प्रायः सोधिने प्रश्न (Frequently Asked Health) 938 29.6% Common health questions
क्यान्सर सम्बन्धी प्रायः सोधिने प्रश्न (Cancer FAQ) 191 6.0% Cancer-specific questions
एस्थेटिक अस्पताल प्रश्नोत्तर (Aesthetic Hospital Q&A) 101 3.2% Cosmetic procedures
छाती तथा एलर्जीसम्बन्धी स्वास्थ्य प्रश्न (Chest & Allergy Health) 100 3.2% Respiratory and allergy issues
स्वास्थ्य, फिटनेस र पोषण (Health, Fitness & Nutrition) 100 3.2% Lifestyle and wellness
भिटिलिगो तथा छालाको स्वास्थ्य (Vitiligo & Skin Health) 99 3.1% Dermatological conditions
अज्ञात (Unknown) 99 3.1% Unclassified entries
राष्ट्रिय स्वास्थ्य सेवा (NHS) जागिर (NHS Jobs FAQ) 97 3.1% Healthcare employment
गर्भनिरोधक सम्बन्धी प्रायः सोधिने प्रश्न (Contraception FAQ) 53 1.7% Family planning

Comprehensive Category Breakdown

Category Count % Sub-topics
Health Q&A 1,235 38.9% Radiology, imaging, general health
Frequently Asked 938 29.6% Patient.info compilations
Cancer-Related 191 6.0% Colorectal cancer focus
Aesthetic 101 3.2% Cosmetic procedures
Respiratory 100 3.2% Asthma, allergies, respiratory care
Fitness & Nutrition 100 3.2% Diet, exercise, weight management
Dermatology 99 3.1% Vitiligo, skin conditions
Healthcare Jobs 97 3.1% NHS employment, careers
Reproductive Health 53 1.7% Contraception, fertility
Medical Education 38 1.2% MBBS in Nepal
Insurance 29 0.9% Health insurance information
Blood Donation 26 0.8% Blood donation FAQs
Ophthalmology 13 0.4% Eye health
Other Specialties 90 2.8% Organ transplant, HIV/AIDS, mountain medicine

Sub-Domain Diversity (Top 15)

Sub-Domain Count Percentage Medical Specialty
रेडियोलोजी तथा इमेजिङ (Radiology & Imaging) 1,235 38.9% Diagnostic imaging
विविध स्वास्थ्यसम्बन्धी विषय (Miscellaneous Health) 496 15.6% General health topics
कोलोरेक्टल क्यान्सर (Colorectal Cancer) 191 6.0% Oncology
हेल्दी च्वाइस एस्थेटिक (Healthy Choice Aesthetic) 101 3.2% Cosmetic medicine
दम तथा एलर्जी (Asthma & Allergy) 100 3.2% Pulmonology
बारम्बार सोधिने प्रश्नहरू (General FAQs) 100 3.2% General knowledge
सामान्य स्वास्थ्य र व्यायाम (General Health & Exercise) 100 3.2% Preventive medicine
भिटिलिगो सम्बन्धी (Vitiligo) 99 3.1% Dermatology
राष्ट्रिय स्वास्थ्य सेवा जागिर (NHS Jobs) 97 3.1% Healthcare careers
विविध स्वास्थ्य अवस्था (Miscellaneous Conditions) 88 2.8% Various conditions
गर्भनिरोधक (Contraception) 53 1.7% Reproductive health
नेपालमा एमबीबीएस (MBBS in Nepal) 38 1.2% Medical education
स्वास्थ्य बीमा (Health Insurance) 29 0.9% Insurance information
रक्तदान (Blood Donation) 26 0.8% Hematology
आँखा अस्पताल (Eye Hospital) 13 0.4% Ophthalmology

4. SOURCE AND ORGANIZATION DIVERSITY

The dataset is compiled from 20+ diverse health organizations and medical institutions, providing varied perspectives and expertise.

Source Distribution (Complete List)

Source Organization Count Percentage Organization Type Focus
RadFAQs 1,235 38.9% Radiology Center Diagnostic imaging Q&A
Patient.info 938 29.6% Healthcare Portal General patient information
Cancer Clinic Pune 191 6.0% Oncology Clinic Cancer treatment & management
CohereLabs/aya_dataset 101 3.2% Research/Dataset Multilingual health content
Chest Clinic of Kathmandu & Allergy Center 100 3.2% Specialty Clinic Respiratory & allergies
Harley Street Institute 100 3.2% Medical Institute General medical information
SAC Nepal 100 3.2% Healthcare Provider Nepalese health services
Fight Vitiligo 99 3.1% Specialist Organization Vitiligo/skin conditions
Global Healthcare Jobs 97 3.1% Employment Portal Healthcare careers
Nepal CRS Company 53 1.7% Healthcare Company Reproductive health
Future Education - MBBS in Nepal 38 1.2% Educational Provider Medical education
स्वास्थ्य बीमा बोर्ड (Health Insurance Board) 29 0.9% Government Agency Health insurance
राष्ट्रिय रक्तसञ्चार सेवा केन्द्र (National Blood Transfusion Service) 26 0.8% Government Service Blood donation & transfusion
Mechi Eye Hospital 13 0.4% Eye Care Center Ophthalmology
Swastha Aviyan Nepal 11 0.3% Health Movement General wellness
Kirtipur Hospital FAQ 10 0.3% Hospital General hospital information
राष्ट्रिय जनस्वास्थ्य प्रयोगशाला (National Public Health Lab) 10 0.3% Government Lab Public health
राष्ट्रिय एड्स तथा यौन रोग नियन्त्रण केन्द्र (National AIDS & STI Center) 7 0.2% Government Center HIV/AIDS & STI
MMSN 6 0.2% Organization Mountain medicine
World Health Organization (WHO) 6 0.2% International Body Public health guidelines
स्वास्थ्य सेवा विभाग अनलाइन सीपीडी (Health Service Online CPD) 4 0.1% Training Provider Professional development

Organization Type Breakdown

Type Count Percentage Examples
Healthcare Portals/Websites 2,173 68.5% Patient.info, RadFAQs
Specialty Clinics 293 9.2% Chest Clinic, Eye Hospital, Cancer Clinic
Government Agencies 73 2.3% Blood Bank, Insurance Board, Public Health Lab
Educational Providers 38 1.2% Medical education institutions
International Organizations 6 0.2% World Health Organization
Research/Dataset Sources 101 3.2% CohereLabs, academic datasets
Other Providers 491 15.4% Healthcare companies, movements

Geographic Diversity

  • Nepal-based Sources: 600+ records (SAC Nepal, Chest Clinic of Kathmandu, Mechi Eye Hospital, Kirtipur Hospital, National services)
  • India-based Sources: 191+ records (Cancer Clinic Pune)
  • UK-based Sources: 2,100+ records (Patient.info, RadFAQs, Harley Street Institute, NHS)
  • International Sources: 183+ records (WHO, CohereLabs multilingual data)

5. TEXT LENGTH AND CONTENT ANALYSIS

Question Length Distribution

Metric Value Range Interpretation
Average Length 7.6 words 2-28 words Moderately concise queries
Minimum Length 2 words Simple queries Very short health inquiries
Maximum Length 28 words Complex queries Multi-part or detailed questions
Median Length ~6 words Typical query Most questions are brief

Distribution Breakdown:

  • Very Short (2-4 words): ~25% | "What is asthma?" type questions
  • Short (5-8 words): ~50% | Most common query length
  • Medium (9-14 words): ~20% | Moderately detailed questions
  • Long (15-28 words): ~5% | Complex multi-part questions

Answer Length Distribution

Metric Value Range Interpretation
Average Length 39.9 words 1-234 words Comprehensive responses
Minimum Length 1 word Single-word answers Rare minimal responses
Maximum Length 234 words Detailed explanations Maximum detail answers
Median Length ~35 words Typical answer Standard informative response

Distribution Breakdown:

  • Minimal (1-5 words): ~8% | Brief direct answers
  • Short (6-20 words): ~30% | Quick informative answers
  • Medium (21-50 words): ~40% | Standard comprehensive answers
  • Long (51-100 words): ~18% | Detailed explanations
  • Very Long (100+ words): ~4% | Extensive medical information

Content Depth Analysis

Answer Length Category Count (Est.) Use Case
Minimal (1-5 words) ~254 Quick fact retrieval, yes/no answers
Short (6-20 words) ~952 Brief health tips, quick explanations
Medium (21-50 words) ~1,270 Standard health information
Long (51-100 words) ~572 Detailed medical explanations
Very Long (100+ words) ~126 Comprehensive disease information

6. DATASET COMPOSITION SUMMARY TABLE

Complete Statistical Overview

Aspect Value Count Percentage
Total Records - 3,174 100%
Behavior Types Informative 1,458 45.9%
General Info 1,363 42.9%
Brief Answer 215 6.8%
Direct Answer 100 3.2%
Mixed Approach 38 1.2%
Question Types Fact-Based 2,831 89.2%
Interrogative 101 3.2%
Health-Specific 100 3.2%
Structured Q&A 100 3.2%
General 4 0.1%
Unclassified 38 1.2%
Primary Domains Health 3,036 95.7%
Aesthetic Medicine 100 3.2%
Education 38 1.2%
Sources Unique Organizations 20+ -
Radiology Focus 1,235 38.9%
General Health 938 29.6%
Specialty Care 939 29.6%
Text Metrics Avg Question 7.6 words
Avg Answer 39.9 words
Max Question 28 words
Max Answer 234 words

7. HOW TO LOAD AND USE THE DATASET

7.1 Prerequisites

Before loading the dataset, ensure you have Python 3.7+ and the following libraries installed:

pip install pandas jsonlines numpy

7.2 Basic Loading - Simple Approach

import json

def load_nepali_health_faq_simple():
    """
    Load the Nepali Health FAQ dataset in a simple, straightforward manner.
    """
    dataset = []
    
    with open('merged_nepali_health_faq_dataset.jsonl', 'r', encoding='utf-8') as f:
        for line in f:
            record = json.loads(line)
            dataset.append(record)
    
    print(f"✓ Loaded {len(dataset)} records")
    return dataset

# Load the dataset
data = load_nepali_health_faq_simple()

# Access first record
first_record = data[0]
print(f"ID: {first_record['id']}")
print(f"Question: {first_record['conversations'][0]['value']}")
print(f"Answer: {first_record['conversations'][1]['value']}")

Output:

✓ Loaded 3174 records
ID: nepali_health_faq_00001
Question: तौल व्यवस्थापनका लागि आधारभूत चयापचय दर किन महत्त्वपूर्ण छ?
Answer: आधारभूत चयापचय दर थाहा पाउँदा शरीरलाई सामान्य रूपमा काम गर्न आवश्यक पर्ने आधारभूत क्यालोरीको संख्या बुझ्न मद्दत हुन्छ...

7.3 Advanced Loading - Structured Approach

import json
from typing import List, Dict, Any
import pandas as pd

class NepaliHealthFAQDataset:
    """
    Advanced loader for the Nepali Health FAQ Dataset with built-in parsing and analysis.
    """
    
    def __init__(self, filepath: str):
        self.filepath = filepath
        self.records = []
        self.metadata = {
            'behaviors': [],
            'question_types': [],
            'domains': [],
            'sources': []
        }
    
    def load(self) -> List[Dict[str, Any]]:
        """
        Load all records from the JSONL file.
        """
        print("📖 Loading Nepali Health FAQ Dataset...")
        
        with open(self.filepath, 'r', encoding='utf-8') as f:
            for idx, line in enumerate(f, 1):
                try:
                    record = json.loads(line)
                    self.records.append(record)
                    
                    # Extract metadata
                    metadata_json = json.loads(record.get('metadata_json', '{}'))
                    self.metadata['behaviors'].append(metadata_json.get('behavior'))
                    self.metadata['question_types'].append(metadata_json.get('question_type'))
                    self.metadata['domains'].append(metadata_json.get('generation_domain'))
                    self.metadata['sources'].append(record.get('source'))
                    
                except json.JSONDecodeError as e:
                    print(f"⚠️  Error parsing line {idx}: {e}")
                    continue
        
        print(f"✓ Successfully loaded {len(self.records)} records\n")
        return self.records
    
    def get_record(self, index: int) -> Dict[str, Any]:
        """
        Get a specific record by index.
        """
        if index >= len(self.records):
            raise IndexError(f"Index {index} out of range. Dataset has {len(self.records)} records.")
        return self.records[index]
    
    def get_qa_pair(self, index: int) -> Dict[str, str]:
        """
        Extract question and answer from a record.
        """
        record = self.get_record(index)
        conversations = record.get('conversations', [])
        
        question = None
        answer = None
        
        for conv in conversations:
            if conv.get('from') == 'human':
                question = conv.get('value', '')
            elif conv.get('from') == 'gpt':
                answer = conv.get('value', '')
        
        return {
            'question': question,
            'answer': answer,
            'source': record.get('source'),
            'behavior': self._get_metadata_value(index, 'behavior')
        }
    
    def _get_metadata_value(self, index: int, key: str) -> str:
        """
        Get metadata value for a record.
        """
        record = self.records[index]
        metadata = json.loads(record.get('metadata_json', '{}'))
        return metadata.get(key, 'N/A')
    
    def get_by_behavior(self, behavior: str) -> List[Dict[str, Any]]:
        """
        Get all records with a specific behavior.
        """
        results = []
        for idx, record in enumerate(self.records):
            metadata = json.loads(record.get('metadata_json', '{}'))
            if metadata.get('behavior') == behavior:
                results.append(record)
        return results
    
    def get_by_source(self, source: str) -> List[Dict[str, Any]]:
        """
        Get all records from a specific source.
        """
        return [r for r in self.records if r.get('source') == source]
    
    def get_by_domain(self, domain: str) -> List[Dict[str, Any]]:
        """
        Get all records from a specific domain.
        """
        results = []
        for record in self.records:
            metadata = json.loads(record.get('metadata_json', '{}'))
            if metadata.get('generation_domain') == domain:
                results.append(record)
        return results
    
    def get_statistics(self) -> Dict[str, Any]:
        """
        Get comprehensive statistics about the dataset.
        """
        from collections import Counter
        
        behaviors = Counter([b for b in self.metadata['behaviors'] if b])
        question_types = Counter([q for q in self.metadata['question_types'] if q])
        sources = Counter([s for s in self.metadata['sources'] if s])
        
        return {
            'total_records': len(self.records),
            'unique_sources': len(set(self.metadata['sources'])),
            'unique_behaviors': len(set(self.metadata['behaviors'])),
            'unique_question_types': len(set(self.metadata['question_types'])),
            'behaviors': dict(behaviors.most_common()),
            'question_types': dict(question_types.most_common()),
            'sources': dict(sources.most_common(10))
        }
    
    def to_dataframe(self) -> pd.DataFrame:
        """
        Convert dataset to a pandas DataFrame for easy analysis.
        """
        data = []
        
        for record in self.records:
            conversations = record.get('conversations', [])
            metadata = json.loads(record.get('metadata_json', '{}'))
            
            question = None
            answer = None
            
            for conv in conversations:
                if conv.get('from') == 'human':
                    question = conv.get('value', '')
                elif conv.get('from') == 'gpt':
                    answer = conv.get('value', '')
            
            data.append({
                'id': record.get('id'),
                'question': question,
                'answer': answer,
                'source': record.get('source'),
                'domain': metadata.get('generation_domain'),
                'category': metadata.get('generation_category'),
                'behavior': metadata.get('behavior'),
                'question_type': metadata.get('question_type'),
                'question_length': len(question.split()) if question else 0,
                'answer_length': len(answer.split()) if answer else 0
            })
        
        return pd.DataFrame(data)

# Usage Example
if __name__ == "__main__":
    # Initialize and load dataset
    dataset = NepaliHealthFAQDataset('merged_nepali_health_faq_dataset.jsonl')
    records = dataset.load()
    
    # Get statistics
    stats = dataset.get_statistics()
    print("📊 Dataset Statistics:")
    print(f"Total Records: {stats['total_records']}")
    print(f"Unique Sources: {stats['unique_sources']}")
    print(f"Unique Behaviors: {stats['unique_behaviors']}")
    print(f"\nTop 5 Behaviors:")
    for behavior, count in list(stats['behaviors'].items())[:5]:
        print(f"  • {behavior}: {count}")
    
    # Get a specific Q&A pair
    qa = dataset.get_qa_pair(0)
    print(f"\n📝 Sample Q&A Pair:")
    print(f"Question: {qa['question']}")
    print(f"Answer: {qa['answer'][:100]}...")
    print(f"Source: {qa['source']}")
    
    # Get records by behavior
    informative_qa = dataset.get_by_behavior('जानकारीमूलक उत्तर दिने')
    print(f"\n✓ Found {len(informative_qa)} informative Q&A pairs")
    
    # Get records by source
    patient_info = dataset.get_by_source('Patient.info')
    print(f"✓ Found {len(patient_info)} records from Patient.info")
    
    # Convert to DataFrame
    df = dataset.to_dataframe()
    print(f"\n📋 DataFrame Shape: {df.shape}")
    print(f"Average Question Length: {df['question_length'].mean():.1f} words")
    print(f"Average Answer Length: {df['answer_length'].mean():.1f} words")
    
    # Display first few rows
    print("\n🔍 First 5 Records:")
    print(df[['id', 'domain', 'behavior', 'question_length', 'answer_length']].head())

Output:

📖 Loading Nepali Health FAQ Dataset...
✓ Successfully loaded 3174 records

📊 Dataset Statistics:
Total Records: 3174
Unique Sources: 20
Unique Behaviors: 5

Top 5 Behaviors:
  • जानकारीमूलक उत्तर दिने: 1458
  • सामान्य जानकारी दिने: 1363
  • छोटो उत्तर माग्ने: 215
  • प्रश्नको प्रत्यक्ष उत्तर दिने: 100
  • छोटो र जानकारीमूलक उत्तर दिने: 38

📝 Sample Q&A Pair:
Question: तौल व्यवस्थापनका लागि आधारभूत चयापचय दर किन महत्त्वपूर्ण छ?
Answer: आधारभूत चयापचय दर थाहा पाउँदा शरीरलाई सामान्य रूपमा काम गर्न आवश्यक पर्ने...
Source: Patient.info

✓ Found 1458 informative Q&A pairs
✓ Found 938 records from Patient.info

📋 DataFrame Shape: (3174, 10)
Average Question Length: 7.6 words
Average Answer Length: 39.9 words

7.4 Filtering and Searching

# Filter by domain
health_records = dataset.get_by_domain('स्वास्थ्य')
print(f"Health domain records: {len(health_records)}")

# Filter by question type
fact_based = [r for r in records 
              if 'तथ्यमा आधारित' in json.loads(r['metadata_json']).get('question_type', '')]
print(f"Fact-based questions: {len(fact_based)}")

# Search by keyword in question
def search_questions(dataset_obj, keyword):
    results = []
    for record in dataset_obj.records:
        conversations = record.get('conversations', [])
        for conv in conversations:
            if conv.get('from') == 'human' and keyword.lower() in conv.get('value', '').lower():
                results.append(record)
                break
    return results

cancer_questions = search_questions(dataset, 'क्यान्सर')
print(f"Records containing 'क्यान्सर' (cancer): {len(cancer_questions)}")

7.5 Data Export

# Export to CSV
df = dataset.to_dataframe()
df.to_csv('nepali_health_faq.csv', index=False, encoding='utf-8-sig')
print("✓ Exported to nepali_health_faq.csv")

# Export to JSON
with open('nepali_health_faq_processed.json', 'w', encoding='utf-8') as f:
    json.dump(records, f, ensure_ascii=False, indent=2)
print("✓ Exported to nepali_health_faq_processed.json")

# Export statistics
stats_df = pd.DataFrame([
    {'Metric': 'Total Records', 'Value': len(records)},
    {'Metric': 'Unique Sources', 'Value': len(set(s['source'] for s in records))},
    {'Metric': 'Avg Question Length', 'Value': f"{df['question_length'].mean():.1f} words"},
    {'Metric': 'Avg Answer Length', 'Value': f"{df['answer_length'].mean():.1f} words"}
])
stats_df.to_csv('dataset_statistics.csv', index=False)
print("✓ Exported statistics to dataset_statistics.csv")

7.6 Working with Conversations

def extract_all_qa_pairs(records):
    """
    Extract all Q&A pairs from records.
    """
    qa_pairs = []
    
    for record in records:
        conversations = record.get('conversations', [])
        
        for i, conv in enumerate(conversations):
            if conv.get('from') == 'human' and i + 1 < len(conversations):
                if conversations[i + 1].get('from') == 'gpt':
                    qa_pairs.append({
                        'record_id': record.get('id'),
                        'question': conv.get('value'),
                        'answer': conversations[i + 1].get('value'),
                        'source': record.get('source'),
                        'language': record.get('language')
                    })
    
    return qa_pairs

qa_pairs = extract_all_qa_pairs(records)
print(f"✓ Extracted {len(qa_pairs)} Q&A pairs")

# Create DataFrame of Q&A pairs
qa_df = pd.DataFrame(qa_pairs)
qa_df['question_word_count'] = qa_df['question'].apply(lambda x: len(x.split()))
qa_df['answer_word_count'] = qa_df['answer'].apply(lambda x: len(x.split()))

print(qa_df[['question', 'answer', 'source']].head())

8. DATASET CHARACTERISTICS AND QUALITY

Data Quality Features

  1. Authentic Health Information: All content from real healthcare providers and medical organizations
  2. Professional Sources: Mix of international (UK-based), regional (India), and local (Nepal) medical expertise
  3. Diverse Medical Specialties: Covers 20+ different medical specialties and health topics
  4. Consistent Formatting: Structured JSONL format with standardized metadata
  5. Multilingual Metadata: Nepali questions and answers with detailed Nepali metadata
  6. Comprehensive Conversation Structure: Question-answer pairs organized in conversation format

Language Characteristics

  • Script: Devanagari (देवनागरी) - Standard Nepali script
  • Language Code: npi (Nepali ISO 639-3 code)
  • Content Quality: Natural, fluent Nepali language with proper grammar and terminology
  • Medical Terminology: Uses standard medical terminology in Nepali

Data Distribution Insights

  1. Heavily Health-Focused (95.7%): Ensures deep coverage of health topics
  2. Balanced Behavior Types (45.9% + 42.9% = 88.8%): Informative and general information dominate
  3. Question-Focused (89.2% fact-based): Practical, informative questions
  4. Multi-Source (20+ sources): Reduces bias from single provider
  5. Professional Expertise: From hospitals, clinics, international organizations, and government agencies

9. RECOMMENDED USE CASES

1. Training Conversational AI Systems

  • Build chatbots that answer health questions in Nepali
  • Train dialogue systems for patient support
  • Develop Q&A systems for medical advice

2. Information Retrieval Systems

  • Search engines for Nepali health information
  • Document retrieval systems for medical research
  • FAQ-based help systems

3. Natural Language Processing Tasks

  • Machine translation (English ↔ Nepali health content)
  • Text classification (medical topic categorization)
  • Named entity recognition (medical terms)
  • Question generation and understanding

4. Educational Applications

  • Medical education platforms in Nepali
  • Patient education materials
  • Health literacy programs

5. Healthcare Technology

  • Clinical decision support systems
  • Patient information databases
  • Telemedicine platforms serving Nepali-speaking populations

10. DATASET LIMITATIONS AND CONSIDERATIONS

Known Limitations

  1. Language Scope: Nepali language only (no English or multilingual queries)
  2. Question Type Dominance: 89.2% are fact-based, fewer procedural or advisory questions
  3. Source Imbalance: RadFAQs (38.9%) and Patient.info (29.6%) dominate the dataset
  4. Domain Concentration: 95.7% health-focused with limited diversity in other fields
  5. Question Complexity: Most questions are relatively simple (average 7.6 words)

Recommendations for Use

  1. For Training: Consider stratified sampling if using subset
  2. For Evaluation: Test model performance across different sources
  3. For Deployment: Verify appropriateness of UK-based health information for Nepali context
  4. For Expansion: Supplement with Nepali-specific health information as needed

11. CITATION AND ATTRIBUTION

If you use this dataset in research or applications, please cite:

@dataset{nepali_health_faq_2024,
  title={Merged Nepali Health FAQ Dataset},
  author={Multiple Healthcare Organizations},
  year={2024},
  license={Apache-2.0},
  language={Nepali},
  records={3174},
  note={Compiled from 20+ healthcare providers including Patient.info, RadFAQs, Cancer Clinic Pune, and various Nepali health organizations}
}

Acknowledge these organizations when using the dataset:

  • Patient.info
  • RadFAQs (Radiology FAQs)
  • Cancer Clinic Pune
  • Chest Clinic of Kathmandu & Allergy Center
  • SAC Nepal
  • Fight Vitiligo
  • Mechi Eye Hospital
  • Nepal-based health organizations and government services

12. GETTING STARTED CHECKLIST

  • Download merged_nepali_health_faq_dataset.jsonl
  • Install Python 3.7+ and required libraries
  • Run dataset loader script to verify data integrity
  • Generate dataset statistics
  • Export to preferred format (CSV, JSON, DataFrame)
  • Analyze behavior and question type diversity
  • Filter data by domain/source for your use case
  • Prepare for model training or system development

13. TECHNICAL SPECIFICATIONS

File Format Details

  • Format: JSONL (JSON Lines) - one complete JSON object per line
  • Encoding: UTF-8 with Devanagari script support
  • File Size: ~50-100 MB (estimated)
  • Compression: Not compressed (recommend gzip for storage)

Required Fields in Each Record

{
  "id": "unique_identifier",
  "conversations": [
    {"from": "human", "value": "question_text"},
    {"from": "gpt", "value": "answer_text"}
  ],
  "source": "organization_name",
  "language": "ne",
  "language_code": "npi",
  "script": "Deva",
  "metadata_json": "{"behavior":"...", "question_type":"...", "domain":"..."}",
  "license": "Apache-2.0"
}

Optional Fields

  • source_name: Display name of source
  • source_split: train/test/validation split
  • condition: real/synthetic
  • generation_type: real/synthetic
  • url: Source URL (if available)

14. SUPPORT AND FEEDBACK

For questions, issues, or feedback:

  1. Review the documentation above
  2. Check your data loading code for errors
  3. Verify file encoding is UTF-8
  4. Ensure sufficient memory for large-scale processing
  5. Test with small subsets first (e.g., 100 records)

15. QUICK REFERENCE TABLES

All Behaviors (5 types)

Behavior Count Use Case
Informative Answer 1,458 Detailed health information
General Information 1,363 Overview-level knowledge
Brief Answer 215 Quick facts
Direct Answer 100 Yes/no or one-liner
Short & Informative 38 Balanced response

All Question Types (6 types)

Type Count Example
Fact-Based 2,831 "क्यान्सर किन हुन्छ?" (Why does cancer occur?)
Interrogative 101 Questions seeking confirmation
Health-Specific 100 Disease-specific queries
Structured Q&A 100 Pre-formatted pairs
General 4 Broad health questions
Unclassified 38 No clear category

Top 10 Sources

Source Records Focus
RadFAQs 1,235 Medical imaging
Patient.info 938 General health
Cancer Clinic Pune 191 Oncology
Multiple (each <100) 810 Specialty topics

Dataset Version: v1.0
Last Updated: 2024
Format: JSONL (3,174 records)
Language: Nepali (नेपाली)
License: Apache-2.0 (Permissive)

Downloads last month
23