Generate Rag Answer
generate_rag_answerBuilds a cited RAG prompt from reranked scientific-paper passages, returning ready-to-send context that grounds answers in evidence and reduces hallucinations.
Instructions
Build a RAG prompt using the reranked passages as the only context.
This helper returns a cited context and a ready-to-send prompt that Claude (or any other generator) can use so that the response is evidence-backed and free of hallucinations.
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": {
"question": "<question>"
},
"name": "generate_rag_answer"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| alpha | No | ||
| top_k | No | ||
| source | No | default | |
| question | Yes | ||
| text_filter | No | ||
| metadata_filter | No | ||
| context_limit_chars | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||