Basic search
Endpoint
Response
Page citations: The
page_start and page_end fields tell you exactly which PDF pages the chunk spans. This enables “jump to page” functionality in document viewers. For documents without page information (TXT, DOCX, or older documents), these fields will be null.Understanding search methods
Vaults support different search methods for different needs:| Method | What it does | Best for |
|---|---|---|
hybrid | Combines meaning + keywords | Default. Best for most queries. |
fast | Meaning only (vector search) | Speed-critical applications |
local | GraphRAG entity search | ”What did [person] say about [topic]?” |
global | GraphRAG corpus-wide | ”What are the main themes across all documents?” |
Hybrid search (default)
Combines semantic understanding with keyword matching. If you search “timeline” it will find documents that say “timeline” AND documents that say “schedule” (similar meaning).TypeScript
Fast search
Pure vector similarity—faster but misses exact keyword matches.TypeScript
GraphRAG: When basic search isn’t enough
Basic search finds individual passages. But some questions need to understand your entire document collection:- “What are the main contradictions between witnesses?”
- “Summarize all the expert testimony”
- “What did Dr. Johnson say about the defendant?”
How GraphRAG works
Enable GraphRAG
GraphRAG requires a one-time initialization to build the knowledge graph:Endpoint
One-time setup. You only initialize GraphRAG once. New documents are automatically added to the graph when ingested.
Global search: Corpus-wide questions
Ask questions that span your entire document collection:TypeScript
- “What are the main themes across all depositions?”
- “Summarize the expert witness testimony”
- “What patterns appear in these contracts?”
Local search: Entity-focused questions
Ask about specific people, organizations, or concepts:TypeScript
- “What did [person] say about [topic]?”
- “What is [company]‘s position on [issue]?”
- “Find everything about [entity]“
When to use what
| Your question | Method | Why |
|---|---|---|
| ”Find testimony about medication” | hybrid | Finding specific passages |
| ”What are the main themes?” | global | Needs corpus-wide synthesis |
| ”What did Dr. Smith say about X?” | local | Entity-focused |
| ”Contradictions between witnesses?” | global | Cross-document analysis |
| Speed-critical search | fast | Pure vector, faster |
Filtering results
Narrow results by metadata you added during upload:TypeScript
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | required | Your question in natural language |
method | string | hybrid | hybrid, fast, local, or global |
topK | number | 10 | How many results to return |
filters | object | {} | Filter by metadata fields |
Response fields
Each chunk in the response includes:| Field | Type | Description |
|---|---|---|
text | string | Preview of the chunk text (up to 500 characters) |
object_id | string | ID of the source document |
chunk_index | number | Position of this chunk in the document (0-based) |
page_start | number | null | PDF page where chunk begins (1-indexed) |
page_end | number | null | PDF page where chunk ends (1-indexed) |
distance | number | Vector similarity distance (lower = more similar) |
Page fields may be null for: non-PDF documents (TXT, DOCX), documents ingested before page tracking was added, or OCR results that don’t include page boundaries.
Understanding scores
Each result has a relevance score from 0 to 1:TypeScript