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.

Install PrismRAG from PyPI Inspect source on GitHub Run the demo app

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

DimensionMeasureFailure to inspect
Category safetyTop-k category precision and bleed rateSemantically similar content crossing an explicit boundary.
Retrieval qualityRecall@k, MRR, nDCG, answer supportRules improving separation while hiding relevant evidence.
Graph valueGraph path versus direct semantic fallbackAdded complexity without measurable retrieval benefit.
AuditabilityMapping rule, community, path, and score traceAn 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.

PrismRAG vs Microsoft GraphRAG Compare Graph RAG tools Evaluation harness Product source and limits