Is Neo4j GraphRAG Python package suitable for hybrid deployments that combine:
- ☁️ Azure Cloud (production workloads)
- 🏢 Local/On-Premises (development, sensitive data, sovereignty requirements)
Our project (neo4j-agentframework) currently implements a flexible hybrid architecture:
- Production: Neo4j Aura (Azure westeurope) + Azure AI Foundry + Container Apps
- Development: Docker Compose (local Neo4j + BitNet LLM + RAG service)
- Knowledge Base: 12 technical books, 30,006 chunks, 100% embedded
- Same codebase works in both environments (cloud/local)
- Data sovereignty for sensitive documents (local processing)
- Cost optimization (local development, cloud production)
- Zero external dependencies option (fully local stack available)
Can GraphRAG work seamlessly with:
- ✅ Neo4j Aura (managed cloud) for production
- ✅ Neo4j Docker (local) for development
- ✅ Neo4j Enterprise (on-prem) for sensitive data
Use Case: Developer tests locally with Docker, deploys same code to Azure Aura production.
Does GraphRAG support multiple LLM backends for hybrid scenarios:
- ☁️ Azure OpenAI (gpt-4o-mini) for production
- 🏠 BitNet.cpp (1.58-bit quantized) for local sovereign environments
- 🤖 Ollama/LM Studio for on-premises deployments
Current Challenge: We use Azure AI Foundry in cloud, BitNet locally. Can GraphRAG adapt?
We currently use SentenceTransformers (all-MiniLM-L6-v2) locally to avoid API costs:
- 384-dimensional embeddings
- Runs on CPU (no GPU required)
- Same model in both environments
Question: Can GraphRAG VectorCypherRetriever work with:
- Local SentenceTransformers embeddings (development)
- Azure OpenAI embeddings (production, if needed)
- Mixed environments (some documents embedded locally, others in cloud)
Our concern about cloud costs:
- Local entity extraction: Process sensitive PDFs on-premises, push only graph structure to cloud
- Cloud entity extraction: Use Azure OpenAI for public documents
- Hybrid approach: Extract entities locally during development, re-use in cloud
Question: Can we run entity extraction locally and sync the resulting knowledge graph to cloud Neo4j?
For air-gapped or restricted environments:
- Can GraphRAG work fully offline (local Neo4j + local LLM)?
- What are the minimum external dependencies if any?
- Does it require internet for any core functionality?
Critical for: Government, healthcare, financial services with data residency requirements.
# Configuration that adapts to environment
import os
from neo4j_graphrag.llm import AzureOpenAILLM, OpenAILLM
from neo4j_graphrag.retrievers import VectorCypherRetriever
# Environment-aware setup
if os.getenv("DEPLOYMENT_ENV") == "production":
# Azure Cloud Production
neo4j_uri = "neo4j+s://6b870b04.databases.neo4j.io"
llm = AzureOpenAILLM(
model="gpt-4o-mini",
azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT")
)
else:
# Local Development / On-Prem
neo4j_uri = "bolt://localhost:7687"
llm = LocalLLM( # BitNet, Ollama, etc.
endpoint="http://localhost:8001"
)
# Same GraphRAG code works everywhere
retriever = VectorCypherRetriever(
driver=driver,
index_name="text_embeddings",
embedder=local_embedder, # SentenceTransformers
retrieval_query=custom_query
)- Development: Free local processing (no API costs during iteration)
- Production: Pay only for actual production queries
- Current: $355-755/month vs $1,000-2,500+ traditional cloud-only
- Healthcare: Process PHI locally, sync anonymized graph to cloud
- Financial: Keep sensitive data on-premises, use cloud for public knowledge
- Government: Fully air-gapped option for classified environments
- Fast iteration: No cloud delays during development
- Same code: Works in laptop Docker → Azure Container Apps
- No surprises: Testing locally = production behavior
Has anyone successfully deployed GraphRAG in hybrid environments? Looking for:
- ✅ Proven patterns for local/cloud flexibility
⚠️ Gotchas or limitations we should know- 💡 Best practices for multi-environment GraphRAG
Tags: hybrid-cloud, on-premises, azure, data-sovereignty, cost-optimization