ipfs_laos_laws_ir
收藏资源简介:
该数据集为老挝法律信息检索数据集(CID-keyed sparse GraphRAG),是 `endomorphosis/ipfs_laos_laws` 的研究检索版本。数据集旨在支持法律文本的检索、图增强检索(GraphRAG)以及基于BM25和向量嵌入的语义搜索。数据包含10757条法律条文(articles),无完整法律文件(laws为0),并构建了属性图:包含11277个节点(每个条目对应一个节点,外加管辖区域、语言、法律文件、来源等分面节点)和142513条边(包括BM25邻居边、文章-法律归属边等)。BM25索引包含13738个词项和333334条倒排记录,向量嵌入使用 `thenlper/gte-small` 模型生成384维向量。规范字段涵盖条目CID、法律CID、记录类型、管辖区域、语言、法律文件ID和标题、文章编号和标题、正文、来源URL、快照日期、覆盖范围、许可证、收集者、源数据集和版本等。数据以Zstandard Parquet分片存储,索引包括BM25词项分片、向量路由质心、文档范围分片以及图的节点、边和邻接表。该数据集仅供研究用途,不构成法律建议,官方来源应优先。
This dataset is a Lao legal information retrieval dataset (CID-keyed sparse GraphRAG), a research retrieval version of `endomorphosis/ipfs_laos_laws`. It is designed to support legal text retrieval, graph-enhanced retrieval (GraphRAG), and semantic search based on BM25 and vector embeddings. The data contains 10,757 legal articles (no full legal documents, laws=0) and builds a property graph with 11,277 nodes (each entry corresponds to a node, plus facet nodes for jurisdiction, language, legal document, source, etc.) and 142,513 edges (including BM25 neighbor edges, article-law belonging edges, etc.). The BM25 index includes 13,738 terms and 333,334 inverted records. Vector embeddings are generated using the `thenlper/gte-small` model with 384 dimensions. Standard fields include entry CID, law CID, record type, jurisdiction, language, legal document ID and title, article number and title, body text, source URL, snapshot date, coverage, license, collector, source dataset, and version. Data is stored in Zstandard Parquet shards, with indexes including BM25 term shards, vector routing centroids, document range shards, and graph nodes, edges, and adjacency lists. This dataset is for research purposes only and does not constitute legal advice; official sources should be prioritized.
数据集概述
该数据集是老挝法律信息检索研究数据集(Laos legislation IR),由 justicedao/ipfs_laos_laws_ir 提供,作为 country-laws-ir-graphrag/v1 研究型检索版本发布,源自上游数据集 endomorphosis/ipfs_laos_laws(修订版本 e12c6a7b89377d6c2732ac7fccc48a2dfe6f818a)。
基本信息
- 许可证:other(具体许可需参考上游来源)
- 任务类别:文本检索(text-retrieval)
- 标签:法律、老挝、GraphRAG、BM25、研究用途(非法律建议)
- 主要标识:
entry_cid(CIDv1 raw sha2-256 规范标识记录的哈希值),整数document_index仅为紧凑分片指针,不构成身份标识
数据规模
| 项目 | 数量 |
|---|---|
| 法律(语料单元) | 0 |
| 条款(语料单元) | 10,757 |
| 规范文档 | 10,757 |
| BM25 词项 | 13,738 |
| BM25 倒排记录 | 333,334 |
| 图节点 | 11,277 |
| 图边 | 142,513 |
| 向量 | 10,757 × 384 维(thenlper/gte-small 嵌入) |
规范字段
每条记录包含:entry_cid、law_cid、record_type、jurisdiction、language、instrument_id、instrument_title、article_number、article_title、title、body、source_url、snapshot_date、coverage、license、collector、source_dataset、source_revision。
单元策略:优先选取条款/章节级别行;当 articles.parquet 为空时回退到法律级别。
索引结构
使用 Zstandard 压缩的 Parquet 分片,每个分片最多 4,096 行。包含以下配置:
- corpus:语料数据(
data/corpus/*.parquet) - bm25_documents / bm25_postings / bm25_keyword_index:BM25 检索文档、倒排记录及关键词分片索引
- vectors / vector_meta_index:向量数据及语义路由质心索引(按与分片质心的余弦相似度排序)
- graph_nodes / graph_edges:属性图节点与边
- graph_outgoing_adjacency / graph_incoming_adjacency:按分数排序的出边/入边邻接页
BM25 参数:Okapi k1=1.2,b=0.75,标题权重=5,正文权重=1,采用 FTS5 unicode61 风格分词器。
图谱结构:每个 entry_cid 对应一个节点,并包含面向(管辖权、语言、文书、来源、状态)的方面节点;邻居边 BM25_NEIGHBOR_OF(k=8)携带分数与匹配词项;结构边包括 ARTICLE_OF(条款→所属法律),以及仅在源数据存在时出现的 IDENTIFIED_BY_ELI / IDENTIFIED_BY。
查询示例
bash
BM25 关键词查询
python scripts/query_country_laws_hf.py --local-dir . bm25 "constitution" --top-k 10
向量语义查询
python scripts/query_country_laws_hf.py --local-dir . vector "money laundering" --top-k 10
图谱邻居查询
python scripts/query_country_laws_hf.py --local-dir . graph neighbors <entry_cid>
重要说明
- 非法律建议:本数据集为研究快照,不构成法律意见。官方公报/老挝权威来源优先于本语料库。检索到的文档和图谱边仅作为检索证据,未虚构任何法律文本。
- 来源与溯源:由 country-laws-ir 打包发布。上游收集者和官方许可证归属于
endomorphosis/ipfs_laos_laws。CID 标识的是本地内容,不证明公共 IPFS 固定。




