set_rag_settings
Updates RAG pipeline settings—passage count, answer length, timeouts, reranker, and embedding model—so the next query uses the new configuration.
Instructions
Change the RAG pipeline from plain words: passages supplied to synthesis (top), answer length, timeouts, the reranker (off, auto, fastembed, openrouter or a model name), or the embedding model (guessing where it runs: Ollama, a small local ONNX model, or an API whose key is already in the environment). For a detected local OpenAI-compatible model, pass embedding_runtime from get_rag_models (LM Studio or vLLM). Never pass API keys here; the user enters keys with rag setup in a terminal. The next query uses the new settings.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "set_rag_settings"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | How many reranked passages answer synthesis may use | |
| reranker | No | off | auto | fastembed | openrouter | a reranker model name | |
| revision | No | Optional revision from get_rag_settings; reject a stale edit before saving. | |
| candidates | No | Candidate passages before reranking | |
| answer_model | No | OpenRouter answer model ID | |
| answer_timeout | No | Seconds to wait for the answer model | |
| context_radius | No | Neighbouring chunks on each side of an answer passage; 0 is off | |
| embedding_model | No | Embedding model name, e.g. qwen/qwen3-embedding-4b or BAAI/bge-small-en-v1.5 | |
| whole_documents | No | Answer from a whole document of at most this many characters, not its passages; 0 is off | |
| reranker_timeout | No | Seconds to wait for the reranker | |
| answer_max_tokens | No | Largest answer length in tokens | |
| embedding_runtime | No | Detected local OpenAI-compatible runtime label (LM Studio or vLLM) when choosing its embedding model | |
| embedding_provider | No | Where the embedding model runs; guessed when omitted | |
| contextual_retrieval | No | Enable or disable Anthropic-style ingestion-time contextual retrieval |