Search & RAG
Hybrid search and AI-powered Q&A across your document corpus.
Search & RAG
DokuBrain provides two ways to find information in your documents: hybrid search for finding relevant chunks, and RAG queries for getting AI-generated answers with source citations.
Hybrid search
Hybrid search combines semantic (vector) similarity with keyword matching for the best of both worlds. Semantic search understands meaning ("payment overdue" matches "past due balance"), while keyword search catches exact terms (invoice numbers, names).
Search parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
query | string | required | The search query |
limit | number | 10 | Maximum results to return |
threshold | number | 0.5 | Minimum similarity score (0-1) |
project_ids | string[] | all | Filter by project |
documentTypes | string[] | all | Filter by document type |
RAG queries
RAG (Retrieval-Augmented Generation) queries retrieve relevant document chunks and use an LLM to generate an answer based on them:
Quality scoring
Every RAG response includes quality metrics:
- Relevancy — how well the answer addresses the question (0-1)
- Grounding — how well the answer is supported by source chunks (0-1)
- Hallucination risk —
low,medium, orhigh
Multi-step reasoning
For complex questions that require reasoning across multiple documents, use multi-step queries:
Multi-step mode is useful for compliance reviews, risk assessments, and cross-document analysis.