query()
Query the knowledge base with natural language. Returns either a complete result dict or a streaming response.Parameters
string
required
Natural-language question to answer.
bool
default:"False"
If
True, return a StreamingResponse that yields tokens as they arrive.string
default:"chat"
Controls answer depth and reasoning style.
string
Override the retrieval depth independently of response mode. Values:
"basic", "thinking", "research".string
LLM model override (e.g.
"gpt-4o"). Uses the default cost-efficient model if not specified.string
Explicit conversation session ID to continue. Use this or
maintain_context, not both.bool
default:"False"
If
True, maintain conversation state across queries. The client tracks the session ID automatically.bool
default:"True"
If
True, include the AI-generated summary. Set to False for raw fact retrieval.bool
default:"False"
Enable web search augmentation for questions that may need external information.
List[str]
List of upload IDs to include as additional context for this query.
Non-streaming response
Streaming response
Response modes
query_facts()
Fast fact retrieval without AI summary generation. Returns the same dict structure but with raw graph facts and vector chunks only.Parameters
string
required
Natural-language question.
int
default:"10"
Maximum number of results to return.
Returns
Same dict structure asquery() but summary will be empty or minimal since no LLM generation occurs.
Insufficient coverage
When the knowledge base has zero relevant facts for a query, Vrin returns early without calling the LLM:resp.insufficient_coverage after iteration completes.