Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitaVerse Banner Image

🌼 GitaVerse-Open-Corpus

An Open, Structured, AI-Ready Corpus of the Bhagavad Gita for RAG, LLM Fine-Tuning, and Research

Ancient wisdom meets modern AI.

GitaVerse-Open-Corpus is a comprehensive, open-source dataset collection built from publicly available Bhagavad Gita datasets, processed and reorganized into a clean, structured, canonical format suitable for:

  • βœ… LLM fine-tuning (instruction, dialogue, persona)
  • βœ… Retrieval-Augmented Generation (RAG)
  • βœ… Vector database indexing
  • βœ… Semantic search engines
  • βœ… Agentic AI systems
  • βœ… Spiritual and educational applications
  • βœ… Academic and linguistic research

This project bridges the gap between ancient scripture and modern AI development, enabling developers, researchers, and practitioners to build meaningful and responsible AI systems grounded in timeless knowledge.


πŸ“¦ Repository Contents


GitaVerse-Open-Corpus/
β”‚
β”œβ”€β”€ datasets/
β”‚   β”œβ”€β”€ scriptures/
β”‚   β”‚   β”œβ”€β”€ K1_original/
β”‚   β”‚   β”œβ”€β”€ K1_processed/
β”‚   β”‚   β”œβ”€β”€ K2_original/
β”‚   β”‚   β”œβ”€β”€ K2_processed/
β”‚   β”‚   β”œβ”€β”€ HF2_original/
β”‚   β”‚   β”œβ”€β”€ HF2_processed/
β”‚   β”‚   β”œβ”€β”€ HF3_original/      (GH1 same)
β”‚   β”‚   β”œβ”€β”€ HF3_processed/
β”‚   β”‚   β”œβ”€β”€ GH2_original/
β”‚   β”‚   β”œβ”€β”€ GH2_processed/
β”‚   β”‚   β”œβ”€β”€ GH3_original/
β”‚   β”‚   └── GH3_processed/
β”‚   β”‚
β”‚   β”œβ”€β”€ qna/
β”‚   β”‚   β”œβ”€β”€ HF1_original/
β”‚   β”‚   β”œβ”€β”€ HF1_processed/
β”‚   β”‚   β”œβ”€β”€ K3_original/
β”‚   β”‚   β”œβ”€β”€ K3_processed/
β”‚   β”‚   β”œβ”€β”€ clustered_qna/
β”‚   β”‚   └── master_qna/        (future)
β”‚   β”‚
β”‚   └── metadata/
β”‚       β”œβ”€β”€ data_sources.csv
β”‚       └── LICENSES.md
β”‚
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ DATASET_ARCHITECTURE.md
β”‚   β”œβ”€β”€ SCRIPT_DOCUMENTATION.md
β”‚   β”œβ”€β”€ USE_CASES.md
β”‚   └── RAG_AND_LLMS_GUIDE.md
β”‚   
β”œβ”€β”€ scripts/             # processing pipeline
|
β”œβ”€β”€ LICENSE
β”œβ”€β”€ README.md
└── CONTRIBUTING.md


πŸ“š Included Dataset Types

This repository includes processed outputs only, not original datasets.

We provide:

βœ… Canonicalized verse datasets + Unified Master Verse File

βœ… Canonicalized modern Q&A datasets

βœ… Clustered & deduplicated Q&A versions

βœ… Commentary-augmented verse structures (GH3 processed)

βœ… Metadata linking sources and licenses

We do NOT redistribute original datasets.

Instead, we provide:

  • Links to original repositories
  • Licensing information
  • Processing methodology

See:


datasets/metadata/data_sources.csv

1️⃣ Scripture Datasets

Code Source Description
K1 Kaggle Sanskrit + English meanings
K2 Kaggle Sanskrit + Transliteration + Hindi + English
HF2 HuggingFace Fully aligned Sanskrit–Hindi–English verses
HF3 / GH1 GitHub Modular dataset (chapter, verse, translation, commentaries)
GH2 Github Chapter-wise structured JSON
GH3 GitHub Multi-author commentary dataset (extensive)

All these are processed into canonical JSONL formats ideal for LLM work.

βœ… Master Canonical Verse File

datasets/scriptures/master_verses/master_verses.jsonl

This file is the fully merged, normalized, author-aligned, multi-source canonical verse dataset generated from:

K1, K2, HF2, GH2, GH3

Each verse contains:

  • Stable verse_id
  • Sanskrit
  • Transliteration (best-available)
  • All translations (multi-author, multi-language)
  • All commentaries (multi-author)
  • Source provenance

2️⃣ Q&A Datasets

Code Source Description
HF1 HuggingFace Verse-wise Q&A (Hindi + English)
K3 Kaggle - Modern Life Q&A Persona-based, verse-aligned, deep reflections
Clustered QnA Our processing Semantic deduplication of 19,902 Q&A pairs

These datasets form the backbone of:

  • semantic search
  • β€œDid you mean this?” suggestions
  • user question enrichment
  • training specialized Gita philosophical models

🧠 Why This Repository Matters

Most Bhagavad Gita datasets online are:

  • fragmented
  • inconsistent
  • poorly structured
  • non-machine friendly
  • mixing commentary formats
  • lacking verse alignment
  • not suitable for AI training

This project:

βœ… normalizes structures

βœ… fixes verse alignment

βœ… standardizes Q&A format

βœ… deduplicates semantic duplicates using embeddings

βœ… creates AI-ready JSONL formats

βœ… adds metadata & provenance tracking


πŸ’‘ What You Can Build with This Suite

πŸ”Ή RAG Systems

  • Scripture-level retrieval
  • Commentary-aware retrieval
  • Modern-question similarity retrieval
  • Sanskrit/Hindi/English cross-language retrieval

πŸ”Ή Fine-Tuned Gita Models

  • SFT models on pure Q&A
  • Commentary-aware LLM
  • Persona-based (18 personas from K3) β€œChapter-specialist” models
  • Verse-expansion generator

πŸ”Ή Apps & Agents

  • β€œAsk Krishna” chatbot
  • Dharma-based life guidance assistant
  • Leadership lessons explainer
  • Spiritual journaling & reflection app
  • Anxiety/depression support (within ethical limits)

πŸ”Ή Educational Tools

  • Quiz generators
  • Flashcards
  • Sanskrit learning helpers
  • Commentary comparison tools

πŸ”Ή Research

  • Cross-dataset variance study
  • Commentary lineage analysis
  • Semantic clustering of verses
  • Tropes & theme modeling

This suite is arguably the most complete open Bhagavad Gita machine-learning dataset collection currently available.


πŸŽ“ Academic Value

The unified design enables:

  • multi-dataset triangulation
  • reduction of hallucination
  • citation-ready canonical format
  • stable IDs for verse, Q&A, commentary
  • future expansion to Upanishads, Vedas, Ramayana, Mahabharata

See:


docs/USE_CASES.md

docs/RAG_AND_LLMS_GUIDE.md


πŸ—οΈ Dataset Architecture

The processed datasets follow a strict canonical schema.

Example canonical Q&A format:


{

"question": "...",

"answer": "...",

"chapter": 4,

"verse": "4.7",

"source": "HF1",

"qid": "HF1-en-4:7-032"

}

Example canonical verse format:


{

"chapter": 2,

"verse": 47,

"sanskrit": "...",

"english": "...",

"hindi": "...",

"commentaries": [...],

"sources": ["GH3","HF2"]

}

Full architecture:


docs/DATASET_ARCHITECTURE.md


🧰 Processing Pipeline

All transformations are performed using reproducible scripts located in:


scripts/

Major processing steps:

  • canonicalization
  • normalization
  • clustering (semantic deduplication)
  • commentary extraction
  • verse metadata alignment

Full documentation:


docs/SCRIPT_DOCUMENTATION.md


πŸ”Ž Clustering & Deduplication

We apply semantic clustering using:

  • SentenceTransformers embeddings
  • Cosine similarity
  • Threshold-based grouping

This reduces Q&A data by ~50% while preserving meaning.

Outputs include:


hf1_qa_clustered.jsonl

k3_qa_clustered.jsonl


🌍 Licensing

This repository is released under:

Creative Commons Attribution 4.0 International (CC BY 4.0)

You may:

βœ… Share

βœ… Adapt

βœ… Use commercially

Under the requirement:

  • Provide attribution to this repository

πŸ“Ž Attribution

If you use this dataset in research or products:

Please cite:


GitaVerse-Open-Corpus (2025), Animesh Shaw & Tattva Chronicles, https://github.com/Tattva-Chronicles/GitaVerse-Open-Corpus


🧾 Sources

This project builds upon publicly available datasets including:

  • Kaggle Bhagavad Gita datasets (K1, K2)
  • HuggingFace datasets (HF1, HF2, HF3)
  • GitHub repositories (GH1, GH2, GH3)
  • DharmicData collections

We claim no ownership over original texts.

This repository contains only processed outputs, not raw sources.


πŸ› οΈ Contributing

We welcome:

  • dataset contributions
  • new commentary mappings
  • language additions
  • tooling improvements
  • documentation enhancements

See:


CONTRIBUTING.md


⭐ Why This Repository Is Unique

This is the first open dataset that:

βœ… combines scripture + commentary + modern Q&A

βœ… standardizes formats across 10+ sources

βœ… deduplicates semantically

βœ… is designed explicitly for AI systems

βœ… provides documented processing scripts

βœ… prioritizes openness and attribution


🌸 Final Words

This project aims to:

  • preserve ancient knowledge
  • enable meaningful AI applications
  • support research and education
  • promote responsible spiritual AI

If this helps you, please ⭐ star the repository and Support the Initiative!

πŸ™ Hari Om


βœ… Citation Formats

πŸ“‘ BibTeX

@dataset{gitaverse_2025,
  title        = {GitaVerse-Open-Corpus},
  author       = {Shaw, Animesh and Contributors},
  year         = {2025},
  publisher    = {GitHub},
  url          = {https://github.com/Tattva-Chronicles/GitaVerse-Open-Corpus},
  license      = {CC-BY-4.0},
  note         = {Open structured corpus for AI and research based on the Bhagavad Gita}
}

πŸ“š APA

Shaw, A., & Contributors. (2025). GitaVerse-Open-Corpus [Dataset]. GitHub.
https://github.com/Tattva-Chronicles/GitaVerse-Open-Corpus.

πŸ“° MLA

Shaw, Animesh, and Contributors. "GitaVerse-Open-Corpus." 2025. GitHub,
https://github.com/Tattva-Chronicles/GitaVerse-Open-Corpus.

License: CC BY 4.0 Status Dataset Size Contributions Welcome Made With ❀️ Python RAG Ready

About

A complete open-source, multi-dataset, multi-format corpus for LLM training, RAG systems, research, and app development.

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages