Skip to content

Answer mode & clusters

When the assistant answers, VOL does more than return text. A ChatResponse contains:

interface ChatResponse {
answer: string; // markdown-ish text with [1], [2]… markers
sessionId: string; // pass it back to continue the conversation
citations: Citation[]; // evidence, in marker order
clusters: AnswerCluster[]; // RAPTOR clusters the evidence belongs to
}

Answer mode is how the VOL app turns that response into a guided view of the map:

  1. The cited nodes are highlighted and numbered like the markers in the text.
  2. VOL requests POST /graph/{case}/subgraph with the cited nodeIndices (1 hop) to reveal the immediate neighbourhood, with edges weighted by similarity.
  3. The answer clusters are drawn as translucent halos around their nodes.
  4. A camera tour visits each citation in order, so the reader sees why each source is relevant.

You can reproduce the same flow in your product with the SDK and <VolGraph focus>.

RAGFlow builds a RAPTOR tree over each dataset: chunks are grouped recursively and summarised. When retrieval hits a summary node, VOL reports it as an AnswerCluster:

interface AnswerCluster {
id: string; // stable within a case
title: string; // short label
summary: string; // LLM summary of the group
nodeIndices: number[]; // documents in the group
}

Fetch a cluster later with GET /clusters/{case}/{clusterId}. Answer clusters are different from the map clusters in clusters.json: map clusters partition the whole layout geometrically, answer clusters are the semantic groups relevant to one question.

The first response creates a sessionId. Send it with the next question to keep context; omit it to start a fresh conversation. Sessions are scoped to the API key or user that created them.