0004 An agent must have a forced (and hidden) rag_search index¶
Status¶
Accepted
Context¶
ai_search:rag_search is a normal agent tool: by default the LLM can choose
which index to query at call time. Retrieval for answers, however, must
always target a known, administrator-approved index.
Decision¶
RagSettingsResolver reads only
tool_usage_limits['ai_search:rag_search']['index']['values'][0]. If that
value is missing, AnswerService::answer() throws a DomainException and the
agent is refused for use with answers.
Consequences¶
- An LLM-pickable index means prompt injection in the conversation could
redirect retrieval at an index the operator never intended to expose.
Forcing the value and hiding the property removes
indexfrom the model's tool schema entirely, so it is not just discouraged but unreachable. - Configuring an agent for answers always requires the extra force-value-and-hide step documented in Getting started.