How azure-samples/graphrag-accelerator works
Project Type and Purpose
• This is a full-stack “solution accelerator” that wraps the Microsoft graphrag library to expose REST APIs (indexing pipelines + graph-based query) and a Streamlit UI.
• Its goal is to run a hosted service on Azure with auto-scaling, security, logging, and managed identity.
File Structure
• Top-level separation:
• backend/ → Python FastAPI-style app (“graphrag_app”) plus unit/integration tests, CLI scripts, Bicep manifests for CronJob/Job
• frontend/ → Streamlit UI (app.py), components, deploy scripts
• infra/ → Azure Bicep modules (AKS, ACR, APIM, CosmosDB, AoAI, Search, Networking, RBAC, Monitoring), Helm chart for AKS, deploy scripts
• notebooks/ → example Jupyter workflows (Quickstart + Advanced)
• CI config (.github/workflows, .azdo/azure-pipeline.yaml) and Dockerfiles for local/dev containers
• Architectural patterns:
• Micro-service API layer (graphrag_app)
• Serverless/VM-based cron jobs for indexing
• Containerized frontend + backend on AKS (via Helm)
• Infrastructure as Code (IaC) with Bicep + Helm
• API Management fronting the service, secure by Azure AD
Extract Key Points from the README
• Hosted services incur cost—uses multiple Azure components (see infra/main.bicep).
• Deployment + Development Guides explain end-to-end provisioning and local development.
a. Main Components
• Users (Clients) – Web UI (Streamlit) or external client apps / notebooks
• Frontend – Streamlit service deployed (AKS or static)
• API Layer – graphrag_app running in containers on AKS
• Batch/CRON Jobs – Kubernetes CronJob or standalone Job pods
• Azure API Management – public entrypoint for APIs (graphrag-api & docs-api)
• Azure Kubernetes Service (AKS) – hosts containers
• Azure Container Registry (ACR) – Docker images
• Azure Cosmos DB – graph storage (knowledge graph)
• Azure Cognitive Search – indexing service
• Azure OpenAI (AoAI) – LLM inference
• Blob Storage – raw data for ingestion
• Azure Monitor / App Insights / Log Analytics – telemetry & logs
• Azure AD – authentication/authorization (managed identity)
• DevOps – GitHub Actions / Azure Pipelines for CI/CD, IaC deployments
b. Relationships & Data Flows
1. Developer commits → CI pipeline builds container → pushes to ACR
2. CI triggers Bicep/Helm deployment → AKS, APIM, Cosmos, Search, AoAI, Storage, Monitoring deployed
3. User/browser → HTTPS → APIM → routes to graphrag_app on AKS
4. graphrag_app → Azure AD (token auth) and AoAI for embeddings/inference
5. graphrag_app (API / CronJobs) → Blob Storage (ingest) → Cognitive Search & Cosmos DB for indexing
6. Streamlit UI → calls graphrag_app via APIM
7. Metrics/logs → App Insights + Log Analytics
c. Architectural Patterns & Principles
• Separation of concerns: frontend vs. backend vs. infra
• Infrastructure as Code: Bicep modules + Helm chart
• Cloud-native: containerized microservices on AKS, PaaS services (CosmosDB, Search, AoAI)
• Event-driven/batch indexing via Kubernetes jobs
• Security by default: API Management + Azure AD + Private Endpoints + RBAC
d. Technologies & Frameworks
• Python, FastAPI (or equivalent)
• Streamlit
• Azure Bicep, Helm
• Kubernetes (AKS)
• Azure API Management
• Azure Cosmos DB, Search, Blob Storage
• Azure OpenAI
• Azure Monitor / App Insights
• GitHub Actions / Azure Pipelines
• Docker, devcontainers
Detail without Overthinking
• Don’t omit any major piece: include CI/CD, IaC, ingress, compute, storage, monitoring, identity
• Both real-time (API) and batch (CronJob) flows
• Detail how frontend and notebooks consume the API