search
Search with LLM-guided tree traversal
Performs an intelligent search across documents using an LLM to navigate the hierarchical tree structure. The LLM evaluates each node's summary to decide which branches to explore, mimicking human reasoning. Returns relevant content with extracted answers and confidence scores.
post/v1/search
Request body
Example request
{
"query": "What are the key benefits of machine learning?",
"document_id": "doc_abc123",
"table_id": "tbl_legal",
"tags": [
"nda",
"confidential"
],
"metadata": {
"author": "Legal Team",
"contract_type": "nda"
},
"max_depth": 10,
"beam_width": 3,
"min_confidence": 0.3,
"limit": 10
}Response
Search completed successfully
Example response
{
"results": [
{
"node_id": "node_xyz789",
"document_id": "doc_abc123",
"path": [
{
"node_id": "node_abc",
"title": "Chapter 3: Machine Learning",
"reasoning": "This chapter covers ML fundamentals relevant to the query"
}
],
"content": "Machine learning enables computers to learn from data...",
"answer": "The key benefits include automation, pattern recognition, and predictive capabilities.",
"confidence": 0.85
}
],
"stats": {
"nodes_visited": 15,
"nodes_pruned": 8,
"llm_calls": 7,
"total_time_ms": 1250
}
}Changes
Changed in 2 of the 7 revisions of this API.11
- ●
removed the request property
authorrequest-property-removed
- ●
- ○
added the new optional request property
authornew-optional-request-property
This revision also has 12 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○