ID_REG_MD_Embed / README.md
Azzindani's picture
Update README.md
4e8d902 verified
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 Embeddings & TF-IDF Vectors

πŸ“– What is this dataset?

This dataset contains Indonesian legal documents with pre-computed embeddings and TF-IDF vectors for building RAG (Retrieval-Augmented Generation) systems. It includes regulations, laws, and legal documents from Indonesia with ready-to-use vector representations.

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

✨ Key Features

  • πŸ“š ~10,000 Indonesian regulations
  • 🎯 Dense embeddings (1024-dimensional vectors)
  • πŸ“Š TF-IDF vectors (5000-dimensional sparse vectors)
  • βš–οΈ Complete legal metadata (regulation type, year, authority, etc.)
  • πŸ” Ready for semantic search - no preprocessing needed!
  • πŸš€ Optimized for RAG retrieval systems
  • πŸ“œ Full document text included
  • πŸ›οΈ Indonesian legal hierarchy preserved

πŸ“Š What's Inside?

πŸ“‹ Document Fields

  • Document content: Full text of legal documents
  • Metadata: Regulation type, number, year, issuing body
  • Structure: Chapters, articles, and sections
  • Embeddings: 1024-dim dense vectors for semantic similarity
  • TF-IDF: 5000-dim sparse vectors for keyword matching

πŸ›οΈ Legal Document Types

  • πŸ“œ UUD - Constitution (Undang-Undang Dasar)
  • πŸ“‹ UU - Laws (Undang-Undang)
  • πŸ›οΈ PP - Government Regulations (Peraturan Pemerintah)
  • 🎯 PERPRES - Presidential Regulations (Peraturan Presiden)
  • πŸ“‘ PERMEN - Ministerial Regulations (Peraturan Menteri)
  • πŸ™οΈ PERDA - Regional Regulations (Peraturan Daerah)

πŸ“‹ Complete Data Schema

Field Type Dimension Description Example
πŸ†” global_id string - Unique document identifier "legal_doc_001"
🏷️ local_id string - Source-specific ID "local_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"
πŸ“… effective_date string - When it takes effect "1999-04-20"
πŸ“– chapter string - Document chapter "BAB I"
πŸ“„ article string - Specific article "Pasal 1"
πŸ“„ content string - Full document text "Pasal 1. Dalam Undang-undang..."
🎯 embedding list[float] 1024 Dense semantic vectors [0.1, 0.2, -0.3, ...]
πŸ“Š tfidf_vector list[float] 5000 Sparse keyword vectors [0.0, 0.15, 0.0, 0.8, ...]
πŸ”’ chunk_id int - Document chunk number 1

⚠️ Important Notes

βœ… What This Dataset Is Good For:

  • πŸ€– Building Indonesian legal RAG systems
  • πŸ” Semantic search in legal documents
  • πŸ“Š Legal document clustering and analysis
  • 🎯 Training legal AI models
  • πŸ“š Legal research and information retrieval

❌ What This Dataset Is NOT:

  • βš–οΈ Not legal advice - for research/education only!
  • 🎯 Not 100% accurate - always verify with official sources
  • 🌍 Not for other legal systems - specific to Indonesia
  • ⏰ Not always current - laws change over time
  • πŸ” Not query-ready - you need to encode your queries

🚨 Limitations:

  • πŸ“ Fixed dimensions - embeddings are 1024-dim, TF-IDF is 5000-dim
  • 🎯 Model dependency - embeddings quality depends on the model used
  • πŸ“Š TF-IDF vocabulary - limited to 5000 most common terms
  • ⏰ Point-in-time - vectors represent documents at creation time
  • πŸ” No query encoder included - you need your own query encoding

πŸ”„ Preprocessing Pipeline

The dataset was created using this pipeline:

  1. πŸ“₯ Data Collection - Indonesian legal documents gathered
  2. 🧹 Text Cleaning - Remove noise, normalize formatting
  3. πŸ“Š TF-IDF Vectorization - Create 5000-dim sparse vectors
  4. 🎯 Embedding Generation - Create 1024-dim dense vectors
  5. βœ… Quality Control - Validate dimensions and formats
  6. πŸ’Ύ Dataset Creation - Package into HuggingFace format

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

Ready-to-use vectors for Indonesian legal RAG systems πŸŽ―πŸ“Š