Datasets:
|
Download skill/query-hf-graphrag/SKILL.md from justicedao/ipfs_kenya_laws_ir: direct link, hf CLI and curl.
- Browser
- Download file 1.94 kB
-
https://huggingface.co/datasets/justicedao/ipfs_kenya_laws_ir/resolve/main/skill/query-hf-graphrag/SKILL.md
- Command line
-
hf download hf://datasets/justicedao/ipfs_kenya_laws_ir/skill/query-hf-graphrag/SKILL.md
-
curl -L -o SKILL.md https://huggingface.co/datasets/justicedao/ipfs_kenya_laws_ir/resolve/main/skill/query-hf-graphrag/SKILL.md
1.94 kB
metadata
name: query-hf-graphrag
description: >-
Query the CID-keyed ipfs_kenya_laws_ir GraphRAG release on Hugging Face with
bounded BM25, centroid-routed vectors, adjacency neighbors, and graph walks.
Use when an agent must retrieve lexical, semantic, or graph context without
downloading the full corpus.
Query ipfs_kenya_laws_ir on Hugging Face
Use the bundled search script. It fetches only the manifest, compact locators, matching posting/vector/adjacency shards, and corpus rows for final hits.
Repository: justicedao/ipfs_kenya_laws_ir. Primary key is entry_cid. Integer document_index
is a compact pointer, not an identity.
Research snapshot. Similarity edges cannot establish legal authority.
Choose retrieval
bm25for citations, docket numbers, quoted terms, and exact names.vectorfor paraphrases and topical similarity.neighbors/walkafter you have anode_cid.- Merge BM25 and vector hits on
entry_cid. Similarity edges (BM25_NEIGHBOR_OF,EMBEDDING_NEIGHBOR_OF,contains_term) are retrieval proposals only.
BM25
python scripts/query_hf_graphrag.py \
--repo-id justicedao/ipfs_kenya_laws_ir \
--revision <pinned-commit> \
bm25 "clean air act section 111" --top-k 10
Local checkout:
python scripts/query_hf_graphrag.py --local-root . bm25 "clean air act section 111"
Install pyarrow and huggingface_hub. Set HF_TOKEN for private datasets.
Always pin --revision for remote queries; never use main.
Neighbors and walks
python scripts/query_hf_graphrag.py --local-root . neighbors <node-cid> --direction both --limit 25
python scripts/query_hf_graphrag.py --local-root . walk <node-cid> --max-depth 2 --max-nodes 100
Inspect fetch_trace. A budget stop is a partial walk, not proof that no
further path exists. Treat hits as context_only.
Read references/schema.md for locator and posting contracts.