Library
The MOCA Library — RAG Q&A and search over the museum's knowledge base (powered by Cortex)
Ask the Library
RAG Q&A over the MOCA knowledge base: hybrid retrieval, optional knowledge-graph context, cited sources. For token-by-token output use the streaming variant.
Ask the Library › Request Body
questionThe question to ask the Library
collection_idScope to one Library collection (see GET /v1/library/collections)
top_kuse_graphInclude knowledge-graph context
use_agenticDeep-research mode: multi-step agent reasoning (slower, more thorough)
Prior turns for follow-up questions (last 20 kept)
Ask the Library › Responses
Answer with citations
Ask the Library (streaming)
Same request as /v1/library/ask, answered as Server-Sent Events. Each data: line is a JSON object: {"content": "…"} token chunks, one {"sources": [...]} event, optional {"thinking": "…"} / {"sub_questions": [...]} (agentic mode), {"graph_context": {...}}, and a final {"done": true}. Deep-research streams can run for minutes — disable proxy buffering.
Ask the Library (streaming) › Request Body
questionThe question to ask the Library
collection_idScope to one Library collection (see GET /v1/library/collections)
top_kuse_graphInclude knowledge-graph context
use_agenticDeep-research mode: multi-step agent reasoning (slower, more thorough)
Prior turns for follow-up questions (last 20 kept)
Ask the Library (streaming) › Responses
SSE stream (text/event-stream)
Search the Library
Hybrid retrieval (vector + keyword + graph) without answer generation — returns scored excerpts. Cheaper and faster than ask; ideal for building your own UX on top.
Search the Library › Request Body
querytop_kcollection_idSearch the Library › Responses
Scored excerpts