ID_REG_MD_KG / README.md
Azzindani's picture
Upload README.md with huggingface_hub
fa6fb0a verified
|
Raw History Blame Contribute Delete
4.64 kB
metadata
license: apache-2.0
language:
  - id
tags:
  - legal
  - indonesia
  - regulations
  - knowledge-graph
  - rag
task_categories:
  - text-retrieval
  - question-answering
size_categories:
  - 100K<n<1M

πŸ“§ Github πŸ”— LinkedIn

πŸ›οΈ Indonesian Legal RAG Dataset with Knowledge Graph Enhancement

πŸ“– What is this dataset?

This dataset contains Indonesian legal documents enhanced with Knowledge Graph features for building better RAG (Retrieval-Augmented Generation) systems. It includes regulations, laws, and legal documents from Indonesia with smart scoring and relationship mapping.

🎯 Perfect for: Legal AI, Indonesian NLP, RAG systems, legal research, and chatbots

✨ Key Features

  • πŸ“š 50,000+ Indonesian legal documents
  • 🧠 Knowledge Graph with legal entity relationships
  • βš–οΈ Authority scores based on Indonesian legal hierarchy
  • ⏰ Temporal scores for document freshness
  • πŸ”— Cross-reference analysis between documents
  • πŸ’Ž Legal concept clustering (sanctions, rights, procedures, etc.)
  • 🎯 Ready-to-use embeddings preserved from source
  • πŸš€ Optimized for RAG retrieval systems

πŸ“Š What's Enhanced?

Original Fields (Preserved)

  • Document text and metadata
  • Embeddings and TF-IDF vectors
  • Regulation details and dates

πŸ†• New Knowledge Graph Fields

  • kg_entities - Extracted legal entities and references
  • kg_concepts - Legal concepts with relationships
  • authority_score - Regulatory importance (0-1)
  • temporal_score - Time-based relevance (0-1)
  • legal_richness - Legal terminology density (0-1)
  • cross_ref_strength - Citation connectivity (0-1)
  • kg_connectivity - Graph relationship richness (0-1)

πŸ“‹ Data Schema

Field Type Description Example
πŸ†” global_id string Unique document ID "legal_doc_001"
πŸ“œ regulation_type string Type of regulation "UU", "PP", "PERPRES"
πŸ›οΈ enacting_body string Government entity "Kementerian Hukum"
πŸ”’ regulation_number string Official number "No. 8 Tahun 1999"
πŸ“… year string Year enacted "1999"
πŸ“ about string Document topic "Perlindungan Konsumen"
πŸ“„ content string Full document text "Pasal 1..."
🎯 embedding list Dense vectors [0.1, 0.2, ...]
🏷️ kg_entities JSON string Legal entities See example above
🧠 kg_concepts JSON string Concept relationships See example above
βš–οΈ authority_score float Legal importance (0-1) 0.85
⏰ temporal_score float Document freshness (0-1) 0.72
πŸ“š legal_richness float Content quality (0-1) 0.68

πŸ—οΈ How It Was Built

1. 🧠 Knowledge Graph Construction

  • Legal Hierarchy: Indonesian regulatory levels (UUD β†’ UU β†’ PP β†’ PERPRES...)
  • Entity Extraction: Regex patterns for laws, articles, government entities
  • Concept Clustering: Groups related legal terms (sanctions, rights, procedures)
  • Relationship Mapping: Connects legal concepts through semantic similarity

2. πŸ“Š Scoring Algorithms

  • Authority Score: Based on Indonesian legal hierarchy (Constitution = highest)
  • Temporal Score: Recent documents get higher scores
  • Legal Richness: Density of legal terminology
  • Cross-Reference: How often document is cited by others
  • KG Connectivity: Richness of concept relationships

3. πŸ’Ύ Memory-Efficient Processing

  • Streaming data processing to handle large datasets
  • Progressive saving to avoid memory issues
  • Batch processing with cleanup

πŸ“ˆ Dataset Stats

  • πŸ“š Documents: 50,000+
  • 🏷️ Entities per doc: 12.4 average
  • 🧠 Concepts per doc: 8.7 average
  • βš–οΈ Authority score: 0.72 Β± 0.18
  • ⏰ Temporal score: 0.68 Β± 0.22
  • 🎯 Processing success: 98.7%

⚠️ Important Notes

βœ… What This Dataset Is Good For:

  • πŸ€– Building Indonesian legal RAG systems
  • πŸ” Legal document search and retrieval
  • πŸ“Š Legal analytics and research
  • 🎯 Training legal AI models
  • πŸ“š Understanding Indonesian legal structure

❌ What This Dataset Is NOT:

  • βš–οΈ Not legal advice - for research only!
  • 🎯 Not 100% accurate - always verify with official sources
  • 🌍 Not for other legal systems - specific to Indonesia
  • ⏰ Not always current - laws change over time

πŸš€ Happy Legal AI Building! πŸ›οΈβœ¨

Made with ❀️ for the Indonesian NLP and Legal AI community