Category guide · Graph RAG library · taxonomy RAG
How to build taxonomy-controlled Graph RAG
Graph construction should reflect the categories your organization uses. A taxonomy-first system maps content to explicit rules, preserves the original semantic vector, and records every graph and retrieval decision.
Taxonomy-first retrieval pipeline
Explicit mapping
Define categories and word-to-category rules before ingest so every assignment has an owner and explanation.
Dual vectors
Keep a semantic vector for meaning and a personal projection for taxonomy separation.
Graph retrieval
Seed a community, expand through the word graph, then semantically re-rank the candidate set.
Storage choice
Use MemoryStore for tests, PostgresStore for production, or adapters for pgvector, ChromaDB, Pinecone, and Weaviate.
Install the Graph RAG path
pip install "prismrag-patch[graph]==0.2.1"
PrismRAG is an Apache-2.0 Python library. Core operation does not require a hosted service or license key. Optional embedding and community-labeling choices remain under the operator's control.
Evaluation scorecard
| Dimension | Measure | Failure to inspect |
|---|---|---|
| Category safety | Top-k category precision and bleed rate | Semantically similar content crossing an explicit boundary. |
| Retrieval quality | Recall@k, MRR, nDCG, answer support | Rules improving separation while hiding relevant evidence. |
| Graph value | Graph path versus direct semantic fallback | Added complexity without measurable retrieval benefit. |
| Auditability | Mapping rule, community, path, and score trace | An assignment or result that cannot be explained. |
Evidence and limitations
The public repository includes a step-by-step parity suite and an evaluation harness across healthcare, pharmacy, and finance fixtures. It asserts ingest completion, graph/community creation, search results, and quality reporting. This is product-authored test evidence, not a neutral comparison benchmark; no cross-vendor accuracy or speed claim is made.