ai_answer
Answers user questions by synthesizing provided context for retrieval-augmented workflows that pass retrieved text with the query.
Instructions
Ask the Datris AI to answer a question based on provided context. Ideal for RAG workflows: first retrieve relevant chunks using a search tool (search_qdrant, search_pgvector, etc.), then pass the retrieved text as context along with the user's question to get a synthesized answer.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>",
"context": "<context>"
},
"name": "ai_answer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The question to answer | |
| context | Yes | Context text to base the answer on (e.g., retrieved document chunks) | |
| sources | No | Optional provenance handles for the context (e.g. find_data results or _datris_* fields from search hits). Echoed back unchanged on the response so the answer and its provenance travel together. |