AI & agents · Retrieval-augmented generation with permission-aware retrieval and guardrails
Answer questions from company knowledge without leaking data or inventing facts
Documents are ingested, chunked and indexed with their access rights. At question time the assistant retrieves only the passages the person may see, asks the model to answer from them with citations, and checks the answer for grounding and sensitive data before returning it. Every exchange is traced and evaluated.
By Archipelego, version 1.
When to use it
- Knowledge lives in documents people already maintain
- Answers must cite their sources
- Different people may see different documents
When not to use it
- The answer needs fresh transactional data: call the system of record instead
- The corpus is tiny and fits in the prompt
- No one owns the quality of the documents
Trade-offs
Gains
- No model training: the knowledge stays in your documents
- Citations make answers checkable
- Permissions are enforced at retrieval
Costs
- Quality depends on chunking and document hygiene
- Retrieval adds latency
- Needs continuous evaluation of groundedness
Ingredients
- Employee
- Assistant
- Answering service
- Identity provider
- Guardrail
- Document sources
- Ingestion pipeline
- Search index
- Language model
- Groundedness evaluation
- Tracing
How it is served
Azure
Azure · Single provider
- Assistant: Teams app
- Answering service: Azure Container Apps
- Identity provider: Microsoft Entra ID
- Guardrail: Azure AI Content Safety
- Document sources: SharePoint
- Ingestion pipeline: Azure AI Search indexers
- Search index: Azure AI Search
- Language model: Azure OpenAI
- Groundedness evaluation: Azure AI Foundry evaluation
- Tracing: Application Insights
Deploy
- Index SharePoint with Azure AI Search, keeping the access control lists
- Filter retrieval by the person’s Entra ID groups
- Screen prompts and answers with Content Safety
- Evaluate groundedness weekly in AI Foundry
Google Cloud
Google Cloud · Single provider
- Assistant: Web app
- Answering service: Cloud Run
- Identity provider: Cloud Identity
- Guardrail: Model Armor
- Document sources: Google Drive
- Ingestion pipeline: Vertex AI Search data stores
- Search index: Vertex AI Search
- Language model: Gemini (Vertex AI)
- Groundedness evaluation: Vertex AI evaluation
- Tracing: Cloud Trace
Deploy
- Connect Drive to a Vertex AI Search data store with access control
- Ground Gemini on the data store and require citations
- Screen with Model Armor
- Evaluate groundedness with Vertex AI evaluation
Open source, self-hosted
Open source · On premises · Sovereign
- Assistant: Open WebUI
- Answering service: FastAPI service
- Identity provider: Keycloak
- Guardrail: Llama Guard
- Document sources: File shares and wiki
- Ingestion pipeline: Unstructured + Airflow
- Search index: Qdrant
- Language model: Llama (vLLM)
- Groundedness evaluation: Ragas
- Tracing: Langfuse
Deploy
- Ingest with Unstructured on an Airflow schedule, storing each chunk’s groups
- Filter Qdrant queries by the person’s Keycloak groups
- Serve the model with vLLM and screen with Llama Guard
- Trace with Langfuse and evaluate with Ragas
Tags: rag, llm, search, knowledge, guardrails, permissions
Open this recipe in Archipelego to pick a variant, follow the method and cook it into a board.