Interface RetrievedChunk

A single chunk of content retrieved during the retrieval phase.

interface RetrievedChunk {
    id: string;
    content: string;
    heading: string;
    sourcePath: string;
    relevanceScore: number;
    matchType: "vector" | "graph" | "research";
}

Properties

id: string

Unique identifier for the chunk (typically from the vector store).

content: string

The text content of the chunk.

heading: string

Section heading or title the chunk belongs to, if available.

sourcePath: string

File path or document source path this chunk was extracted from.

relevanceScore: number

Relevance score (0 to 1) indicating how well this chunk matches the query. Higher is better.

matchType: "vector" | "graph" | "research"

Which retrieval method produced this chunk.

  • 'vector' — Dense vector similarity search
  • 'graph' — Knowledge graph traversal (GraphRAG)
  • 'research' — Iterative deep research synthesis