query_knowledge_base
Verifies user read access via Apache Ranger before querying a RAG knowledge base. Returns answers with sources if permitted, otherwise denies access.
Instructions
Query a RAG knowledge base with Ranger authorization check.
First checks Apache Ranger to verify the user has 'read' access to the specified knowledge base. If allowed, forwards the query to RAG Studio and returns the answer. If denied, returns an access denied message.
Args: user: Username to check permissions for (e.g., 'alice', 'bob'). knowledge_base: Name of the knowledge base to query (e.g., 'Finance KB', 'HR Policies'). query: The question to ask the knowledge base.
Returns: If authorized: The RAG response with answer and sources. If denied: An access denied message with the reason.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user | Yes | ||
| query | Yes | ||
| knowledge_base | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |