Configuration for VectrixDB's GraphRAG implementation
enabledWhether GraphRAG is enabled
chunk_sizeTarget tokens per chunk
chunk_overlapOverlapping tokens
chunk_by_sentencePreserve sentence boundaries
extractorExtraction method
nlp_modelNLP model name
llm_providerLLM provider
llm_modelModel name
llm_api_keyAPI key
llm_endpointCustom endpoint
llm_temperatureTemperature
llm_max_tokensMax tokens
max_community_levelsMax hierarchy depth
min_community_sizeMin entities per community
relationship_thresholdMin relationship strength
deduplicate_entitiesMerge similar entities
entity_similarity_thresholdSimilarity for dedup
search_typeDefault search strategy
local_search_kSeed entities for local search
global_search_kCommunities for global search
traversal_depthMax hops
include_relationshipsInclude relationship context
include_community_contextInclude community summaries
enable_incrementalIncremental updates
batch_sizeChunks per batch
use_cacheCache embeddings
cache_ttlCache TTL seconds
entity_typesTypes to extract
relationship_typesTypes to extract
new()Create a new GraphRAGConfig
GraphRAGConfig$new(enabled = FALSE, ...)enabledEnable GraphRAG
...Additional configuration options
with_openai()Configure for OpenAI
GraphRAGConfig$with_openai(model = "gpt-4o-mini", api_key = NULL)modelModel name
api_keyAPI key
Self
with_ollama()Configure for Ollama
GraphRAGConfig$with_ollama(
model = "llama3.2",
endpoint = "http://localhost:11434"
)modelModel name
endpointEndpoint URL
Self
clone()The objects of this class are cloneable with this method.
GraphRAGConfig$clone(deep = FALSE)deepWhether to make a deep clone.
if (FALSE) {
config <- GraphRAGConfig$new(enabled = TRUE)
db <- Vectrix$new("knowledge_base", graphrag_config = config)
}
Run the code above in your browser using DataLab