Datasets:
Vishva R commited on
Update README.md
Browse files5 unmodified lines67891011123 unmodified lines1617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562575 unmodified linestags:- finance- legalpretty_name: RBI Circular QA Datasetsize_categories:- 10K<n<100Kconfigs:3 unmodified linespath: data/train-*- split: evalpath: data/eval-*dataset_info:features:- name: documentdtype: string- name: filenamedtype: string- name: model_namedtype: string- name: regulation_areadtype: string- name: applicable_todtype: string- name: issued_ondtype: string- name: key_topicslist: string- name: chunks_textdtype: string- name: is_tabledtype: bool- name: questiondtype: string- name: answerdtype: string- name: evaluation_criteriadtype: string- name: categorydtype: string- name: estimated_difficultydtype: int64- name: rephrased_questiondtype: string- name: rephrased_answerdtype: string- name: data_sourcedtype: stringsplits:- name: trainnum_bytes: 295763732num_examples: 47934- name: evalnum_bytes: 6268939num_examples: 1000download_size: 27466632dataset_size: 302032671---# RBI Circular QA Dataset-----## Dataset DescriptionThis dataset contains question-answer pairs extracted from Reserve Bank of India (RBI) circulars spanning **2020 to 2025**. The dataset was created using Google's Gemini-2.0-flash model to generate high-quality QA pairs from official RBI regulatory documents.The dataset includes an `eval` split, comprising 1000 carefully sampled and rephrased questions and answers from the training data. For these evaluation samples, questions and answers have been rephrased using the Google Gemini-2.0-flash model via Langchain, providing a valuable resource for evaluating model robustness to linguistic variations.-----## Dataset Summary- **Total QA Pairs**: The dataset includes **12,000 training samples** and a dedicated `eval` split of **1000 rephrased QA pairs**.- **Language**: English- **Domain**: Banking and Financial Regulations- **Source**: RBI Official Circulars (**2020-2025**)- **Generation Model**: Google Gemini-2.0-flash- **License**: Please refer to RBI's terms of use for the original documents.-----## Dataset StructureThe dataset is organized into two splits: `train` and `eval`.### Data FieldsEach row in both splits of the dataset contains the following fields. The `eval` split contains populated `rephrased_question` and `rephrased_answer` fields, while these fields are present but empty in the `train` split to maintain a consistent schema across all data.| Field | Type | Description || :------------------- | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- || `document` | string | Original document/circular title || `filename` | string | Source filename from the JSON processing || `model_name` | string | Name of the model used for QA generation (Gemini-2.0-flash) || `regulation_area` | string | Area of banking regulation (e.g., Credit, Risk Management, etc.) || `applicable_to` | string | Target entities (Banks, NBFCs, etc.) || `issued_on` | string | Date when the circular was issued || `key_topics` | string | Main topics covered in the circular || `chunks_text` | string | Relevant text chunk from the document || `is_table` | boolean | Whether the source content contains tabular data || `question` | string | Generated question || `answer` | string | Corresponding answer || `evaluation_criteria` | string | Criteria for evaluating the QA pair quality || `category` | string | Category/type of the question || `estimated_difficulty` | string | Difficulty level of the question || `rephrased_question` | string | A rephrased version of the `question`, populated in the `eval` split, empty in `train`. || `rephrased_answer` | string | A rephrased version of the `answer`, populated in the `eval` split, empty in `train`. |-----## Dataset Creation### Source Documents- **RBI Official Circulars**: **2020, 2021, 2022, 2023, 2024, and 2025**- **Source Website**: [RBI Circular Index](https://www.rbi.org.in/scripts/bs_circularindexdisplay.aspx)- **Format**: PDF documents converted to structured text- **Coverage**: Comprehensive banking and financial regulations### Generation Process1. **Document Collection**: RBI circular PDFs downloaded from the [official RBI website](https://www.rbi.org.in/scripts/bs_circularindexdisplay.aspx).2. **Document Processing**: PDF documents were processed and chunked into manageable segments.3. **QA Generation**: Google Gemini-2.0-flash model generated relevant question-answer pairs for the primary dataset.4. **Evaluation Split Construction**: A subset of **1000 QA pairs** was carefully sampled and rephrased from the **training split** to form the `eval` dataset. This ensures the evaluation set reflects the distribution of the training data while introducing linguistic variations.5. **Rephrasing**: For the evaluation subset, questions and answers were rephrased using the Google Gemini-2.0-flash model via Langchain's Pydantic structured output, ensuring consistency in the output format.6. **Quality Control**: Evaluation criteria and difficulty estimation are included for each QA pair.7. **Structuring**: Data is organized with comprehensive metadata and regulatory context, with consistent features across all splits.### Code and MethodologyThe complete data preparation pipeline is available at:**GitHub Repository**: [https://github.com/vishvaRam/Data-Prep-for-LLM-fine-tuning](https://github.com/vishvaRam/Data-Prep-for-LLM-fine-tuning)-----## Use Cases### Primary Applications- **Financial Chatbots**: Training conversational AI for banking queries, including robustness testing with rephrased inputs.- **Regulatory Compliance**: Question-answering systems for RBI regulations.- **Educational Tools**: Learning resources for banking professionals.- **Research**: Analysis of Indian banking regulatory framework and evaluation of language model performance on rephrased content.### Model Training- Fine-tuning language models for banking domain.- Retrieval-Augmented Generation (RAG) systems.- Question-answering model development and evaluation of model generalization on semantically similar but syntactically different questions and answers.- Regulatory text understanding.-----## Loading the Dataset### Using Hugging Face Datasets```pythonfrom datasets import load_dataset# Load the datasetdataset = load_dataset("Vishva007/RBI-Circular-QA-Dataset")# Access the 'train' splitprint(f"Dataset 'train' split size: {len(dataset['train'])}")print(f"Features: {dataset['train'].features}")# Example usage from 'train' splitfirst_train_qa = dataset['train'][0]print(f"Train Question: {first_train_qa['question']}")print(f"Train Answer: {first_train_qa['answer']}")print(f"Train Rephrased Question (expected empty): {first_train_qa['rephrased_question']}")# Access the 'eval' splitprint(f"\nDataset 'eval' split size: {len(dataset['eval'])}")print(f"Features: {dataset['eval'].features}")# Example usage from 'eval' splitfirst_eval_qa = dataset['eval'][0]print(f"Eval Original Question: {first_eval_qa['question']}")print(f"Eval Rephrased Question: {first_eval_qa['rephrased_question']}")print(f"Eval Original Answer: {first_eval_qa['answer']}")print(f"Eval Rephrased Answer: {first_eval_qa['rephrased_answer']}")```### Using Pandas```pythonimport pandas as pdfrom datasets import load_datasetdataset = load_dataset("Vishva007/RBI-Circular-QA-Dataset")# Load train split to pandasdf_train = dataset['train'].to_pandas()print("\nTrain Split Head:")print(df_train.head())# Load eval split to pandasdf_eval = dataset['eval'].to_pandas()print("\nEval Split Head (showing rephrased columns):")print(df_eval.head())```-----## Data Quality and Limitations### Strengths- Generated by state-of-the-art Gemini-2.0-flash model for primary QA.- Includes a specialized `eval` split with rephrased content from Gemini-2.0-flash, enhancing evaluation capabilities.- Comprehensive metadata for each QA pair.- Covers recent RBI regulations (**2020-2025**).- Structured format suitable for ML applications.### Limitations- AI-generated content may contain inaccuracies, particularly for rephrased content.- Limited to English language.- Covers only **2020-2025** period.- May not capture all nuances of complex regulatory language.- The rephrased content is model-generated and should be considered as such for evaluation purposes.### Recommended Usage- Always verify critical information with original RBI circulars.- Use as supplementary training data alongside human-verified content.- Suitable for research and educational purposes.- The `eval` split is particularly useful for assessing the robustness and generalization of models to variations in phrasing.-----## Contact and Contributions- **Creator**: Vishva Ram- **GitHub**: [https://github.com/vishvaRam/Data-Prep-for-LLM-fine-tuning](https://github.com/vishvaRam/Data-Prep-for-LLM-fine-tuning)- **Issues**: Please report any issues or suggestions through GitHub-----## DisclaimerThis dataset is created for educational and research purposes. The original RBI circulars remain the authoritative source for regulatory information. Users should verify all information with official RBI publications before making any regulatory or compliance decisions.-----## LicensePlease refer to the Reserve Bank of India's terms of use for the original circular documents. The dataset structure and generated QA pairs are provided under standard research usage terms.5 unmodified lines678910111213143 unmodified lines181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121135 unmodified linestags:- finance- legal- data-augmentation- paraphrasingpretty_name: RBI Circular QA Dataset (Augmented)size_categories:- 10K<n<100Kconfigs:3 unmodified linespath: data/train-*- split: evalpath: data/eval-*---# RBI Circular QA Dataset (Augmented Edition)## 🎯 Overview- **47,934 training examples** (12K original + 36K rephrased)- **1,000 evaluation examples**- **3x data augmentation** via semantic paraphrasing- **Domain**: Indian Banking & Financial Regulations (RBI Circulars 2020-2025)- **Model**: Google Gemini-2.0-flash---## What's NewThis augmented version includes **3 rephrased variations** for each original QA pair, providing:- Better model generalization- Reduced overfitting- Improved robustness to linguistic variations- Optimized for fine-tuning 3B-7B parameter models---## Dataset Structure### Splits- **train**: 47,934 examples- **eval**: 1,000 examples### Key Fields| Field | Type | Description || ------------------------ | ------ | ------------------------------------------------ || `question` | string | Question (original or rephrased) || `answer` | string | Corresponding answer || `data_source` | string | **NEW**: `"original"` or `"rephrased"` || `document` | string | Source RBI circular title || `regulation_area` | string | Banking regulation category || `estimated_difficulty` | int | Difficulty level (1-5) || `rephrased_question` | string | Populated only in eval split || `rephrased_answer` | string | Populated only in eval split |---## Data AugmentationEach original QA was augmented with 3 variations using:- **Syntactic diversity**: Different question structures (What/How/Explain)- **Lexical variation**: Synonym substitution while preserving technical terms- **Structural changes**: Formal ↔ conversational, detailed ↔ conciseAll rephrasings maintain semantic equivalence to originals.---## Use Cases- Fine-tuning LLMs for banking domain QA- Training robust financial chatbots- Regulatory compliance systems- Data augmentation research- Evaluating model generalization---## Training Tips1. **Use full dataset** (47,934 examples) for best results2. **Shuffle thoroughly** to mix original and rephrased3. **Lower learning rate** may be needed due to increased size4. **Monitor both** original and rephrased eval performance---## Links- **GitHub**: [Data Preparation Pipeline](https://github.com/vishvaRam/Data-Prep-for-LLM-fine-tuning)- **Source**: [RBI Official Circulars](https://www.rbi.org.in/scripts/bs_circularindexdisplay.aspx)---## LicenseMIT License - Dataset structure and generated contentOriginal RBI circulars: Subject to RBI's terms of use---## DisclaimerAI-generated content for educational/research purposes. Verify critical information with official RBI publications.
README.md+61-205