Skip to main content
Part of Purple8 Hyper Graph · No Pinecone · No LangChain

GraphRAG that actually knows the graph.

Three retrieval modes built directly into the same engine as your knowledge graph. The vector index, the graph traversal, and the BM25 scorer all share the same store. No Pinecone to provision, no LangChain retrieval chain to maintain. And a self-tuning parameter optimiser that learns your corpus and persists the best configuration automatically.

Three retrieval modes

The right mode for every corpus.

rag.profile_collection analyses your graph topology and tells you which mode to use. rag.tune_collection then optimises the parameters autonomously.

🔍

Flat Vector

rag.query

When to use

Direct factual retrieval, semantic similarity, single-hop questions

How it works

HNSW ANN search over all node embeddings, top-k by cosine similarity

Best for

FAQ systems, document search, direct Q&A

🕸️

GraphRAG

rag.graph_query

When to use

Multi-hop questions, relational queries, 'what connects X to Y?'

How it works

Vector seeds → BFS expansion over typed edges → context assembly from neighbourhood

Best for

Research synthesis, due diligence, knowledge discovery

Hybrid

rag.hybrid_query

When to use

Mixed corpora, when you don't know which mode to use — let the system decide

How it works

BM25 keyword + HNSW vector + graph traversal, fused with configurable alpha weight

Best for

Enterprise knowledge bases, large mixed document corpora, production RAG

Self-tuning

RAG parameters that optimise themselves.

Most teams set RAG parameters once at launch and never revisit them. Corpus drift silently degrades retrieval quality over months.

rag.tune_collection runs a grid-search over fusion_alpha, expand_hops, and seed_k using token-F1 scoring against your expected answers. The best configuration is saved as a named CollectionProfile and applied to every subsequent query automatically.

Call it when you deploy. Call it again when your corpus grows. No retrieval engineer required.

# 1. Profile your corpus topology

rag.profile_collection()

→ topology_class: "dense" · recommended: fusion_alpha=0.7

# 2. Autonomous parameter search

rag.tune_collection(

corpus="my-kb",

save_as="my-kb-v2"

)

→ best_score: 0.87 · improvement: +23% · saved

# 3. Every query uses it automatically

rag.hybrid_query(

q="...",

collection_profile="my-kb-v2"

)

rag.* namespace

6 MCP tools. Agents query, tune, and rerank.

rag.query

Flat vector retrieval — HNSW ANN, top-k by cosine similarity

rag.graph_query

Graph-augmented retrieval — vector seeds + BFS edge expansion

rag.hybrid_query

BM25 + vector + graph fusion with configurable alpha weight

rag.profile_collection

Analyse corpus topology and return recommended retrieval settings

rag.tune_collection

Autonomous grid-search optimiser — finds best params, saves as profile

rag.rerank

Cross-encoder reranking pass over retrieved results

GraphRAG vs flat vector

Why the graph changes everything.

Standard RAG (flat vector)
  • Retrieves by similarity only — misses relational context
  • Multi-hop questions fail — no graph traversal
  • Manual prompt engineering to compensate for retrieval gaps
  • Separate vector DB to provision, scale, and pay for
  • No self-tuning — parameters set once and forgotten
Purple8 GraphRAG
  • Vector similarity AND graph traversal in one query
  • Multi-hop questions answered via edge expansion
  • rag.profile_collection recommends mode automatically
  • HNSW index built in — no separate vector service
  • rag.tune_collection optimises parameters autonomously

Use cases

Where GraphRAG outperforms flat vector

⚖️

Legal document Q&A

Query contracts, case law, and regulations across thousands of documents. Graph edges (CITES, AMENDS, SUPERSEDES) let agents answer 'which clause in contract A conflicts with precedent B?' — impossible with flat vector.

🔬

Scientific literature synthesis

Ingest papers, extract entities and citations into the graph. GraphRAG traverses citation networks to find supporting, contradicting, and related findings — not just similar text.

🏦

Financial research

Analyst agents query earnings reports, news, and filings simultaneously. Graph edges between companies, products, and markets surface relationships that keyword or vector search misses.

🏥

Clinical knowledge retrieval

Drug interactions, contraindications, and treatment protocols connected as a knowledge graph. Multi-hop queries: 'what drugs interact with X in patients with condition Y?' answered in one pass.

🛠️

Enterprise support systems

Product documentation, support tickets, and resolved cases linked by product version, issue type, and resolution. Agents find solutions to novel issues by traversing similar-case graphs.

🏗️

BIM & technical documentation

Building components, specifications, and standards connected in the AEC graph. Engineers query: 'what structural members are affected by this load change?' — graph traversal, not text search.

FAQ

Common questions

What is GraphRAG and how is it different from standard RAG?

Standard RAG (flat vector) retrieves the top-k most similar chunks by embedding distance alone. GraphRAG augments this with graph traversal — after finding seed nodes via vector search, it expands outward through typed relationships (AUTHORED_BY, CITES, PART_OF, RELATED_TO) to pull in contextually connected content that wouldn't appear in a pure similarity search. This dramatically improves recall on multi-hop questions and relational queries.

What RAG modes does Purple8 support?

Three modes: (1) rag.query — flat vector search, fastest, best for direct factual retrieval; (2) rag.graph_query — graph-augmented, expands via typed edges, best for relational and multi-hop questions; (3) rag.hybrid_query — BM25 keyword + HNSW vector + graph traversal fused with a configurable alpha weight, best for mixed corpora. The system profiles your corpus topology and recommends the right mode automatically.

What does rag.tune_collection do?

rag.tune_collection runs an autonomous grid-search over fusion_alpha, expand_hops, seed_k, and vector_weight parameters. It uses token-F1 scoring against your expected answers to find the configuration that maximises retrieval quality on your specific corpus — then saves it as a named CollectionProfile so every subsequent query uses it automatically. No manual tuning required.

Does Purple8 require a separate vector database?

No. Purple8 Hyper Graph includes an HNSW vector index built directly into the engine. Embeddings are stored alongside graph nodes — the same store that holds your knowledge graph holds your vectors. There is no Pinecone, no Weaviate, no pgvector, no Qdrant. Vector search and graph traversal run in the same process, with no network hop between them.

How does graph-guided search improve performance at scale?

At large corpus sizes, a naive vector search fans out across all index segments. Purple8's graph_guided_search pre-selects candidate segments via BFS over the graph structure, then passes only those segments to the HNSW search. On clustered corpora, this can eliminate the majority of segment fan-out entirely — the benefit grows with corpus size and graph connectivity.

Start with GraphRAG in 60 seconds

Free to start. All three retrieval modes work out of the box. Bring your own documents.