Datasets:
The dataset viewer is not available for this dataset.
Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
π Indonesian Regulation Markdown RAG Dataset (ID_REG_MD_RAG)
This repository contains a highly structured, Markdown-optimized collection of Indonesian Regulations (Peraturan Perundang-undangan). This dataset is specifically engineered to solve the "structure loss" problem often encountered when building Retrieval-Augmented Generation (RAG) systems for complex legal documents. ποΈ
π‘ The Concept: Structural Integrity for RAG
Legal documents in Indonesia follow a strict hierarchy: Undang-Undang β Peraturan Pemerintah β Peraturan Menteri, subdivided into Bab (Chapters), Bagian (Parts), Paragraf (Paragraphs), and Pasal (Articles).
Standard text-stripping methods lose this hierarchy, causing RAG systems to retrieve "Pasal 1" without knowing which Chapter or Regulation it belongs to. This dataset solves that by:
- ποΈ Markdown Conversion: All regulations are converted into clean Markdown, using headers (
#,##,###) to preserve the legal hierarchy. - π Contextual Anchoring: Each chunk maintains its structural relationship to the parent heading, allowing LLMs to "see" the full path of a regulation.
- βοΈ RAG-Ready Chunking: Optimized for semantic splitters that respect Markdown boundaries, ensuring that an Article is never cut in half during retrieval.
π οΈ Data Acquisition & Pipeline
This dataset was compiled using a systematic developer workflow:
- Source: Official Indonesian regulatory repositories and government gazettes. π
- Transformation: Raw documents (PDF) were processed through a custom pipeline to extract structural elements and reformat them into consistent Markdown syntax. π
- Methodology: Built using legitimate developer-sanctioned methods, ensuring clean data lineage and high-fidelity text extraction without the noise of typical web scraping. β
π§ͺ Use Cases
- Advanced RAG Pipelines: Powering legal assistants that can accurately identify the specific Bab or Bagian a statute belongs to. π
- Semantic Search: Building search engines that understand the hierarchical importance of legal headers. π
- Legal Knowledge Graphs: Using the Markdown structure to map relationships between different regulatory tiers. π§
- LLM Fine-Tuning: Training models to generate legal documents that follow the official Indonesian legislative format. π
π Dataset Structure
Each entry is optimized for ingestion:
- filename: The official name of the regulation (e.g., UU Nomor 1 Tahun 2024).
- content_md: The full text of the regulation in structured Markdown format. π
- metadata: Includes the type of regulation, year of issuance, and original source references.
π License & Attribution
This dataset is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0). π
Attribution
- Dataset Curator: Azzindani (via Hugging Face Datasets).
- Original Source: Government of the Republic of Indonesia (Public Domain).
Disclaimer: This dataset is provided for research and development purposes. While formatted for high accuracy in AI applications, users should always verify the text against official government gazettes (Lembaran Negara) for formal legal activities. β οΈ
- Downloads last month
- 63