Search
Search returns matching knowledge cards ranked by relevance. No LLM involved — pure vector search with optional reranking.Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | required | Search query |
top_k | integer | 10 | Number of results (1-100) |
rerank | boolean | true | Apply cross-encoder reranking |
current_only | boolean | true | Only return current document versions |
filters | object | null | Metadata filters (see below) |
Filters
Narrow results by metadata:| Filter | Description |
|---|---|
knowledge_type | Card type (e.g. knowledge, procedure, reference) |
document_id | Restrict to cards from a specific document |
Ask
Ask a question and get an AI-generated answer grounded in your knowledge base.Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
question | string | required | Your question |
model | string | auto | LLM model to use |
mode | string | "full" | "fast" (direct search → LLM) or "full" (pipeline with agent escalation) |
stream | boolean | false | Stream response as SSE events |
top_k | integer | 10 | Number of knowledge cards to retrieve |
current_only | boolean | true | Only use current document versions |
chat_history | array | [] | Previous conversation turns for multi-turn |
filters | object | null | Same filters as search |
Modes
fast — Retrieves cards, sends to LLM, returns answer. Deterministic and quick. Filters and current_only are fully supported.
full — Uses the full pipeline with smart routing and agent escalation. May take longer but handles complex questions better. Note: filters and current_only are not supported in full mode.
Response
Streaming
Setstream: true to receive Server-Sent Events:
| Event | Description |
|---|---|
status | Processing status update |
answer_chunk | Partial answer text (stream as it arrives) |
source | Source knowledge card used for the answer |
done | Stream complete, includes token usage and model info |
Multi-turn conversations
Pass previous turns inchat_history for follow-up questions:
[question, answer] pair.