{ "schema_version": "country-laws-ir-graphrag/v1", "layout_family": "skillcenter-huggingface-release/v3", "packager_version": "0.5.0", "primary_key": "entry_cid", "dataset_id": "endomorphosis/ipfs_peru_laws", "dataset_repo_id": "justicedao/ipfs_peru_laws_ir", "dataset_revision": "b9d7781812a5fa8a03bc091b8f08b90b305282b0", "country": { "slug": "peru", "repo": "endomorphosis/ipfs_peru_laws", "name": "Peru", "indexable": true, "skip_reason": null }, "disclaimer": "Research snapshot. Not legal advice. The official gazette / authentic source prevails.", "bm25": { "k1": 1.2, "b": 0.75, "title_weight": 5.0, "body_weight": 1.0, "average_document_length": 492.495460199005, "tokenizer": "hf-graphrag-bm25-tokens/v1", "max_query_terms": 64, "posting_rows_per_record": 4096, "terms_per_shard": 4096 }, "counts": { "bm25_document_chunks": 4, "bm25_documents": 16080, "bm25_keyword_shards": 17, "bm25_posting_rows": 67613, "bm25_postings": 2428340, "bm25_terms": 67529, "corpus_chunks": 4, "corpus_rows": 16080, "graph_edge_chunks": 0, "graph_edges": 128640, "graph_incoming_adjacency_edges": 0, "graph_incoming_adjacency_rows": 0, "graph_incoming_adjacency_shards": 0, "graph_node_chunks": 0, "graph_nodes": 23024, "graph_outgoing_adjacency_edges": 0, "graph_outgoing_adjacency_rows": 0, "graph_outgoing_adjacency_shards": 0, "vector_chunks": 4, "vector_rows": 16080, "n_laws": 1735, "n_articles": 14345, "bm25_token_instances": 7919327 }, "parquet": { "compression": "zstd", "compression_level": 6, "max_rows_per_file": 4096, "row_group_size": 4096, "query_engine": "duckdb" }, "graph": { "adjacency_pointers_per_row": 4096, "adjacency_pointers_per_shard": 8192, "directions": [ "incoming", "outgoing" ], "max_remote_walk_depth": 8, "ordering": "score_desc_nulls_last", "edge_types": [ "HAS_JURISDICTION", "HAS_LANGUAGE", "BELONGS_TO_LAW", "HAS_ARTICLE", "BM25_NEIGHBOR_OF" ] }, "vector": { "model_name": "thenlper/gte-small", "dimension": 384, "similarity": "cosine", "assignment": "recursive_spherical_kmeans", "layout": "semantic_centroid_groups", "rows_sorted_by": "cosine_similarity_to_shard_centroid_desc", "max_rows_per_chunk": 4096, "max_rows_per_centroid": 8192, "max_shards_per_centroid": 2, "default_probe_centroids": 4, "centroid_count": 6, "shard_count": 6, "n_vectors": 16080, "status": "embedded" }, "canonical_fields": [ "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" ], "input_sha256": { "laws.parquet": "fea22e08bc1e35d3021f3075a3193150334d5b4e25576a04cb97f9ba179b422b", "articles.parquet": "5b62e48fd10bdf5f4d634cbb71899c9afde24573ea1b133213e97cd9cbcb2bc8" }, "model_id": "thenlper/gte-small", "cid": { "codec": "raw", "hash": "sha2-256", "multibase": "base32", "payload": "json.dumps(obj, sort_keys=True, ensure_ascii=False, separators=(',', ':')).encode('utf-8')" }, "normalization": { "source_dataset": "endomorphosis/ipfs_peru_laws", "source_revision": "b9d7781812a5fa8a03bc091b8f08b90b305282b0", "laws_sha256": "fea22e08bc1e35d3021f3075a3193150334d5b4e25576a04cb97f9ba179b422b", "articles_sha256": "5b62e48fd10bdf5f4d634cbb71899c9afde24573ea1b133213e97cd9cbcb2bc8", "n_laws_in": 1735, "n_articles_in": 14345, "unit": "law+article", "article_law_coverage": 8.26801152737752, "sparse_article_fallback": false, "drops": { "empty_body": 0, "missing_instrument": 0, "duplicate_cid": 0, "duplicate_source_kept_first": 0 }, "drop_samples": { "empty_body": [], "missing_instrument": [], "duplicate_cid": [] }, "language_breakdown": { "es": 16080 }, "quality_flags": { "articles_table_empty": false, "sparse_article_fallback": false, "article_law_coverage": 8.26801152737752, "all_source_article_counts_zero": false, "article_extraction_status_counts": { "ok": 1567, "missing": 168 }, "missing_date": false, "missing_date_issued": true, "eli_present": true, "never_invented_legal_text": true, "empty_bodies_dropped": 0, "duplicate_cids_dropped": 0 }, "schema_surprises": [ "laws.article_count dtype=int32", "laws.date_issued is entirely null", "laws.eli non-null=1735/1735", "laws.language values=['es']" ], "n_out": 16080, "never_invented_legal_text": true, "n_before_dedupe": 16080, "n_law_rows": 1735, "n_child_rows": 14345, "n_instruments": 1735, "n_dropped_total": 0, "record_type_breakdown": { "article": 14345, "law": 1735 }, "jurisdiction_breakdown": { "PE": 16080 }, "snapshot_dates": [ "2026-09-03" ], "heading_language_counts": { "es": 389 }, "heading_language_majority": "es", "document_language_majority": "es", "verification": { "schema_version": "country-laws-normalize-verify/v1", "slug": "", "admitted": true, "n_checks": 8, "n_failed": 0, "failed_ids": [], "checks": [ { "id": "nonempty_corpus", "severity": "fail", "passed": true, "message": "normalized corpus has rows", "evidence": { "n_out": 16080, "n_dropped": 0 } }, { "id": "entry_cid_unique", "severity": "fail", "passed": true, "message": "every row has a unique entry_cid", "evidence": { "missing": 0, "empty": 0, "duplicate": 0 } }, { "id": "never_invented_legal_text", "severity": "fail", "passed": true, "message": "normalizer did not invent legal text", "evidence": { "never_invented_legal_text": true } }, { "id": "html_residual", "severity": "fail", "passed": true, "message": "HTML tags stripped from legal bodies", "evidence": { "n_bodies": 16080, "n_with_tags": 0, "fraction": 0.0, "samples": [] } }, { "id": "short_bodies", "severity": "warn", "passed": true, "message": "most legal units have usable body length", "evidence": { "n_short": 207, "n_bodies": 16080, "fraction": 0.012873134328358208 } }, { "id": "parent_laws", "severity": "warn", "passed": true, "message": "parent instruments present (1735 law rows from 1735 source laws)", "evidence": { "n_laws_in": 1735, "n_law_rows": 1735 } }, { "id": "legal_structure", "severity": "warn", "passed": true, "message": "retrieval units are structured (law+article, coverage=0.89)", "evidence": { "unit": "law+article", "structured_rows": 14345, "coverage": 0.8921019900497512 } }, { "id": "heading_language", "severity": "warn", "passed": true, "message": "heading lexicon es vs document language es", "evidence": { "document_language": "es", "heading_language": "es", "heading_counts": { "es": 389 } } } ], "blocks_graphrag": false } }, "schema_mapping": { "laws": { "id": "instrument_id", "title": "instrument_title", "text": "body", "article_count_dtype_source": "int32" }, "articles": { "id": "source_id / article identity", "law_id": "instrument_id", "title": "article_title", "text": "body" }, "unit_policy": "prefer articles; fall back to law-level when articles empty", "required_law_columns": [ "id", "title", "text" ], "required_article_columns": [ "id", "law_id", "title", "text" ], "fail_closed": true, "notes": "Malta and Germany share the same column names. Drift: Malta article_count is int64, Germany article_count is int32; Germany eli is often null. Identifiers are never invented. Layout matches SkillCenter HF release / publicus-ir family." }, "indexes": { "bm25_document_chunks": { "cid": "bafkreicybe4xyr5q7zkzubqqkufdm527rgj7spwwaukl674vsmoxfmjhlm", "sha256": "5809397c47b0fe559a0610550a36775f8993f93ed60514bf7f95931d72b1275b", "size_bytes": 5127, "relative_path": "indexes/bm25_document_chunks.parquet" }, "bm25_keyword_shards": { "cid": "bafkreibl3fcvnjb27yyagikj3p554setreqcgitinvx6iblc2ouapheapm", "sha256": "2bd94556a43afe30032149dbfbde489389202322686d6fe40562d3a8079c807b", "size_bytes": 6617, "relative_path": "indexes/bm25_keyword_shards.parquet" }, "corpus_chunks": { "cid": "bafkreigy6t6xefhvi4f6lv7lt4s44fluynlsdtcw5fvab4kjkf3q6337vi", "sha256": "d8f4fd7214f5470be5d7eb9f25ce1574c35721cc56e96a00f14951770f6f7faa", "size_bytes": 9140, "relative_path": "indexes/corpus_chunks.parquet" }, "graph_edge_chunks": { "cid": "bafkreigcwovxxvrirdi42fye5jzw6zg3rehci2tuo636paoe5lbq4462t4", "sha256": "c2b3ab7bd62888d1cd1704ea736f64db890e246a7477b7e781c4eac30e73da9f", "size_bytes": 10456, "relative_path": "indexes/graph_edge_chunks.parquet" }, "graph_incoming_adjacency": { "relative_path": "indexes/graph_incoming_adjacency.parquet", "present": false }, "graph_node_chunks": { "cid": "bafkreia3btirm64tvq5g72yxv4djs2jzhgd5zhevgl2ofgwjcw5tu4xutu", "sha256": "1b0cd1167b93ac3a6feb17af069969393987dc9c9532f4e29ac915bb3a72f49d", "size_bytes": 5792, "relative_path": "indexes/graph_node_chunks.parquet" }, "graph_outgoing_adjacency": { "relative_path": "indexes/graph_outgoing_adjacency.parquet", "present": false }, "vector_chunks": { "cid": "bafkreielbo4l52e4wfvojbf6npaqkkyeecbunuxc6wsypxajycdozuyu4e", "sha256": "8b0bb8bee89cb16ae484be6bc1052b04208346d2e2f5a587dc09c086ecd314e1", "size_bytes": 31969, "relative_path": "indexes/vector_chunks.parquet" } }, "source": { "source_dataset": "endomorphosis/ipfs_peru_laws", "source_revision": "b9d7781812a5fa8a03bc091b8f08b90b305282b0", "laws_path": "/home/barberb/.ipfs_datasets/country-laws-ir/cache/hf/datasets--endomorphosis--ipfs_peru_laws/snapshots/b9d7781812a5fa8a03bc091b8f08b90b305282b0/data/laws.parquet", "articles_path": "/home/barberb/.ipfs_datasets/country-laws-ir/cache/hf/datasets--endomorphosis--ipfs_peru_laws/snapshots/b9d7781812a5fa8a03bc091b8f08b90b305282b0/data/articles.parquet", "laws_sha256": "fea22e08bc1e35d3021f3075a3193150334d5b4e25576a04cb97f9ba179b422b", "articles_sha256": "5b62e48fd10bdf5f4d634cbb71899c9afde24573ea1b133213e97cd9cbcb2bc8", "n_laws_source": 1735, "n_articles_source": 14345, "laws_columns": [ "id", "title", "text", "source_url", "source_type", "jurisdiction", "country", "language", "eli", "date", "date_issued", "retrieved_at", "license", "law_status", "identifier", "official_identifier", "article_count", "json_path", "metadata_json" ], "articles_columns": [ "law_id", "id", "title", "text", "source_url", "document_number", "article_number", "record_type", "metadata_json" ], "article_count_dtype": "int32", "schema_surprises": [ "laws.article_count dtype=int32", "laws.date_issued is entirely null", "laws.eli non-null=1735/1735", "laws.language values=['es']" ] }, "incremental": { "kind": "full_rebuild", "mode": "auto", "reason": "operator forced full rebuild", "source_revision": "b9d7781812a5fa8a03bc091b8f08b90b305282b0", "prior_revision": "b9d7781812a5fa8a03bc091b8f08b90b305282b0", "source_fingerprint": "b9d7781812a5fa8a03bc091b8f08b90b305282b0|fea22e08bc1e35d3021f3075a3193150334d5b4e25576a04cb97f9ba179b422b|5b62e48fd10bdf5f4d634cbb71899c9afde24573ea1b133213e97cd9cbcb2bc8", "prior_fingerprint": "b9d7781812a5fa8a03bc091b8f08b90b305282b0|fea22e08bc1e35d3021f3075a3193150334d5b4e25576a04cb97f9ba179b422b|5b62e48fd10bdf5f4d634cbb71899c9afde24573ea1b133213e97cd9cbcb2bc8", "delta": { "n_added": 15642, "n_removed": 13907, "n_unchanged": 438, "prior_count": 14345, "current_count": 16080, "changed_ratio": 0.9727611940298507, "equivalent_to_full": false, "added_cids_sample": [ "bafkreia225g5darat3tgj4xwm5an7ex3synum3fe5zik3hzoxv5ovpfane", "bafkreia22hq6sdxhl2mfcujow3rp2hr4emmxlqw26lzazab4rtx2ew2qzm", "bafkreia22pgduqen2kenqmyf3hcnay5r5xlaxfdsp3vqnpnviujee24nhm", "bafkreia22pk6ww6ltivz35pa5tfzc6bwvwoadgfl3kh3co6wpxn2w4m2wy", "bafkreia22wanakezaehqupwo5gcl7np3mfgcltgzl3npetpo5k6n4dl67u", "bafkreia23na66emyipygzpxlaqhi6h2sgroey6tvsqg4uzkyzofp3ytwh4", "bafkreia23nywmkzmeowbtncxqc2jln2lr46oob62fnosl5hurfp3msd2ha", "bafkreia24lfej5rdxwf3lxpc3jlphsl3g7p2sc4ne2knqebqdpbhuuohta" ], "removed_cids_sample": [ "bafkreia224gpfxi2wj42qt7jjfdjz3dsteace44r5ii2eeygiqxex63xju", "bafkreia22w4ba4uzyino6sour365nlsr3tk4xub3lj3vq3y35cxssy2gx4", "bafkreia23tmb6xvdczy7cigkccm6l36ou5453wvga5ye6rden5khsrpsvi", "bafkreia24vcneznrunocuqppb2u7g4axlpbef3uik4hclylxaejcrfslzm", "bafkreia25azgvrs62slpwcn22poxq2o46xc3kpf23rd6n6hj7fikvf3mcm", "bafkreia25utbrnjzwokyljckz6n3p45olvarepnjin53s45tmsd2ldgssy", "bafkreia262nbzok6n4kpzkhr26brfellzj2dax7oxtvatko2b7jctmb2ee", "bafkreia26a47v7efigzp3qubdekisaeaiuckte4n567rvdz6uui3ptr6la" ] }, "reuse_embeddings": false, "skip_build": false, "equivalent_to_full": true, "schema_version": "country-laws-ir-graphrag/v1", "vectors": { "n_docs": 16080, "n_reused": 0, "n_encoded": 16080, "n_missing": 0, "model_name": "thenlper/gte-small", "model_revision": "17e1f347d17fe144873b1201da91788898c639cd", "dimension": 384, "status": "merged", "device": "cuda", "device_fallback": false } }, "sparse": { "engine": "hf_graphrag", "schema_version": "country-laws-ir-graphrag/v1", "bm25": { "bm25": { "average_document_length": 492.495460199005, "b": 0.75, "body_weight": 1.0, "k1": 1.2, "max_query_terms": 64, "posting_rows_per_record": 4096, "terms_per_shard": 4096, "title_weight": 5.0, "tokenizer": "hf-graphrag-bm25-tokens/v1" }, "configs": { "bm25_documents": "data/bm25/documents/*.parquet", "bm25_postings": "data/bm25/postings/*.parquet", "bm25_keyword_index": "indexes/bm25_keyword_shards.parquet" }, "counts": { "bm25_document_chunks": 4, "bm25_documents": 16080, "bm25_keyword_shards": 17, "bm25_posting_rows": 67613, "bm25_postings": 2428340, "bm25_terms": 67529, "bm25_token_instances": 7919327 }, "indexes": { "bm25_document_chunks": { "cid": "bafkreicybe4xyr5q7zkzubqqkufdm527rgj7spwwaukl674vsmoxfmjhlm", "relative_path": "indexes/bm25_document_chunks.parquet", "row_count": 4, "sha256": "5809397c47b0fe559a0610550a36775f8993f93ed60514bf7f95931d72b1275b", "size_bytes": 5127 }, "bm25_keyword_shards": { "cid": "bafkreibl3fcvnjb27yyagikj3p554setreqcgitinvx6iblc2ouapheapm", "relative_path": "indexes/bm25_keyword_shards.parquet", "row_count": 17, "sha256": "2bd94556a43afe30032149dbfbde489389202322686d6fe40562d3a8079c807b", "size_bytes": 6617 } }, "schema_version": "hf-graphrag-bm25-layout/v1" }, "graph": { "node_count": 23024, "edge_count": 128640, "adjacency": "data/graph/adjacency/{out,in}/*.parquet" }, "sqlite": false, "query_engine": "duckdb" } }