This document explains how to configure Flexible GraphRAG using environment variables and configuration files.
| File | Purpose |
|---|---|
.env |
Your main configuration file — copy from flexible-graphrag/env-sample.txt |
flexible-graphrag/env-sample.txt |
Template with all options and inline examples |
The configuration file opens with DB selection and framework config, followed by per-service settings:
PG_GRAPH_DB=neo4j # Property graph: neo4j | arcadedb | falkordb | ladybug | memgraph |
# nebula | neptune | neptune_analytics | arangodb | apache_age |
# cosmos_gremlin | hugegraph | surrealdb | tigergraph | spanner | none
RDF_GRAPH_DB=none # RDF store: fuseki | oxigraph | graphdb | neptune_rdf | none
VECTOR_DB=qdrant # Vector: qdrant | elasticsearch | opensearch | chroma | milvus |
# weaviate | pinecone | postgres | lancedb | neo4j | none
SEARCH_DB=elasticsearch # Search: bm25 | elasticsearch | opensearch | noneCHUNKER_BACKEND=llamaindex # llamaindex | langchain
GRAPH_BACKEND=llamaindex # llamaindex | langchain (auto for LC-only stores)
VECTOR_BACKEND=llamaindex # llamaindex | langchain
SEARCH_BACKEND=llamaindex # llamaindex | langchain
KG_EXTRACTOR_BACKEND=llamaindex # llamaindex | langchain
RETRIEVAL_FUSION=llamaindex # llamaindex | langchain (EnsembleRetriever/RRF)Use {TYPE}_*_DB_CONFIG — takes precedence over generic fallbacks:
# Property graph
PG_GRAPH_DB=neo4j
NEO4J_GRAPH_DB_CONFIG={"uri": "bolt://localhost:7687", "username": "neo4j", "password": "password"}
# Vector
VECTOR_DB=qdrant
QDRANT_VECTOR_DB_CONFIG={"host": "localhost", "port": 6333}
# Search
SEARCH_DB=elasticsearch
ELASTICSEARCH_SEARCH_DB_CONFIG={"hosts": ["http://localhost:9200"], "index_name": "hybrid_search"}
# RDF
RDF_GRAPH_DB=fuseki
FUSEKI_BASE_URL=http://localhost:3030
FUSEKI_DATASET=flexible-graphragNEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=password
ELASTICSEARCH_URL=http://localhost:9200
QDRANT_HOST=localhost
QDRANT_PORT=6333# Current: OpenAI + Qdrant + Elasticsearch + Neo4j
LLM_PROVIDER=openai
VECTOR_DB=qdrant
SEARCH_DB=elasticsearch
PG_GRAPH_DB=neo4j
# Switch to: Ollama + Milvus (LC backend) + OpenSearch + ArangoDB (LC-only)
LLM_PROVIDER=ollama
VECTOR_DB=milvus
VECTOR_BACKEND=langchain
SEARCH_DB=opensearch
PG_GRAPH_DB=arangodb
# GRAPH_BACKEND auto-set to langchain for arangodbDevelopment: Start with the defaults — Neo4j for graph, Qdrant for vector, Elasticsearch for search.
Vector-only RAG (no KG extraction, faster ingest):
PG_GRAPH_DB=none
ENABLE_KNOWLEDGE_GRAPH=false
VECTOR_DB=qdrant- Property Graph Configuration — all 15 stores, LC-only stores, framework config
- Vector Configuration — 10 stores, dimension compatibility
- Search Configuration — BM25, ES, OpenSearch; LC backends
- LangChain Configuration — full dual-framework config, scope tags, synonym expansion
- LLM & Embedding Config — all 13 LLM providers + embedding providers
- Schema Examples — ontology-guided extraction examples
- Source Paths — filesystem, cloud, repository path formats
- Port Mappings — all service ports to avoid conflicts