Overview:

RAG Access Control ensures that users can only access documents they are authorized to, based on their role. The system ensures that only document IDs matching the user’s access level are returned.

Integration Setup:

  1. Select a Knowledge Base: Choose the knowledge base (e.g., Google Drive) that you want to integrate. Only the admin of the selected knowledge base should complete the integration process.
  2. Credentials: After selecting the knowledge base, authorize access through Google OAuth to finalize the integration.
  3. Integration Location: The integration can be found under RAG Access Control in the Project Settings page. The organization admin is responsible for completing the integration setup for the organization.

Post-Integration Flow:

Once the integration is complete, follow these steps to verify RAG access:

  1. Query the Endpoint: You will need to query the following endpoint to check document access
https://gr-prd.aporia.com/<PROJECT_ID>/verify-rag-access
  1. Request Body: The request body should contain the following information:
{
  "type": "google-kb",
  "doc_ids": ["doc_id_1"],
  "user_email": "sandy@aporia.com"
}
  1. API Key: Ensure the API key for Aporia is included in the request header for authentication.

  2. Response: The system will return a response indicating the accessibility of documents. The response will look like this:

{
  "accessible_doc_ids": ["doc_id_1", "doc_id_2"],
  "unaccessible_doc_ids": ["doc_id_3"],
  "errored_doc_ids": [{"doc_id_4": "error_message"}]
}