Skip to Content

Guide

Graphs in Chat

Knowledge graphs help AI find better answers by following relationships between concepts.

Knowledge graphs don’t just create pretty visualizations. They make your AI chat smarter. When you ask a question, the graph helps find relevant information that traditional search might miss.

Traditional search works by matching keywords. If you search for “CEO compensation”, it finds documents containing those words.

But what if a document says:

“John Smith, who leads the company, received a $2M bonus last year.”

Traditional search might miss this because it doesn’t contain “CEO” or “compensation”. The knowledge graph knows that “John Smith” → “leads” → “the company”, connecting it to your question.

How Graph-Enhanced Search Works

You Ask a Question

Type your question in the chat panel.

Entity Recognition

AI identifies entities in your question. For “What’s the relationship between Apple and Google?”, it recognizes “Apple” and “Google” as entities.

Graph Traversal

The system looks up these entities in your knowledge graph and follows their relationships to find connected entities and concepts.

Combined Retrieval

Results from graph traversal are combined with traditional search (semantic + keyword) to find the most relevant passages.

Answer Generation

AI generates a response using passages found through all methods, with citations.

What Graph Retrieval Adds

Finding Indirect Connections

Without graph: Search finds documents mentioning your exact query.

With graph: Search also finds documents about related entities.

Example:

  • Question: “What are the risks of Project Aurora?”
  • Graph knows: “Project Aurora” → “depends on” → “Cloud Provider X”
  • Graph also knows: “Cloud Provider X” → “has history of” → “Security incidents”
  • Result: Finds passages about cloud provider risks even if they don’t mention “Aurora”

Cross-Document Discovery

When entities appear in multiple documents, the graph connects them:

  • Document A: Mentions “Sarah Chen” is VP of Engineering
  • Document B: Discusses engineering team challenges
  • Graph connects: Questions about “Sarah Chen” can surface relevant passages from Document B

Relationship-Aware Answers

The graph preserves relationship types, so AI understands not just that things connect, but how:

RelationshipWhat AI Learns
”causes”Causality for “why” questions
”before/after”Sequence for timeline questions
”manages”Hierarchy for organizational questions
”uses”Dependencies for technical questions

When Graph Retrieval Helps Most

Complex Questions

Questions involving multiple concepts or relationships:

  • “How does X affect Y?”
  • “What’s the connection between A and B?”
  • “Who is responsible for…?”

Research Across Many Documents

When you have many sources about related topics:

  • Academic papers in a field
  • Company documents about a project
  • News articles about an industry

Discovering Non-Obvious Connections

Finding relationships you didn’t know existed:

  • Shared dependencies
  • Common personnel
  • Hidden causal chains

Seeing Graph Retrieval in Action

Thinking Stages

When you ask a question, watch the thinking stages:

StageWhat It Means
Graph SearchFinding entities related to your question
TraversalFollowing relationships in the graph

These stages show that graph retrieval is being used.

Citations

Responses may include passages that don’t obviously match your keywords. This often means graph retrieval found them through relationships.

Best Practices

Build Rich Graphs

The more sources you add, the more connections the graph can find.

  • Add multiple documents about the same topic
  • Include different perspectives (papers, reports, articles)
  • Let the graph consolidate entities across sources

Ask Relationship Questions

Graph retrieval excels at relationship questions:

Less EffectiveMore Effective
”Tell me about Company X""How does Company X relate to Market Y?"
"What is machine learning?""How does machine learning connect to our product?"
"Who is John Smith?""What’s John Smith’s role in Project Z?”

Use Entity Names

When you mention specific entities from your sources, the graph can look them up directly:

  • “What challenges does Project Aurora face?”
  • “How has Sarah Chen contributed to the engineering team?”
  • “What are the risks of Cloud Provider X?”

Technical Details

How Results Are Combined

Graph results are merged with traditional search using Reciprocal Rank Fusion (RRF):

  1. Vector search finds semantically similar passages
  2. Full-text search finds keyword matches
  3. Graph retrieval finds relationship-connected passages
  4. RRF combines rankings from all three methods

This ensures you get the best of all approaches.

Traversal Depth

By default, the graph follows relationships two hops deep:

  • Direct: Entities you mention
  • 1 hop: Entities directly connected to those
  • 2 hops: Entities connected to the connected entities

Deeper traversal finds more connections but may introduce noise.

Scoring by Distance

Passages are scored based on how they were found:

  • Direct mention: Highest relevance (1.0)
  • 1 hop away: High relevance (0.8)
  • 2 hops away: Moderate relevance (0.6)

This ensures directly relevant passages rank higher than distantly connected ones.

Limitations

Graph Needs Data

Graph retrieval only works if:

  • Your sources have been processed
  • Knowledge graph building completed successfully
  • Relevant entities were extracted

Not All Questions Benefit

Simple factual questions may not need graph retrieval:

  • “What date was the report published?” (keyword search is enough)
  • “What’s the definition of X?” (semantic search handles this)

Graph retrieval adds most value for relationship and connection questions.

Learn More

Last updated on