pub struct GraphRAGConfig {Show 19 fields
pub top_k: usize,
pub max_seeds: usize,
pub expansion_hops: usize,
pub max_subgraph_size: usize,
pub max_context_triples: usize,
pub enable_communities: bool,
pub community_algorithm: CommunityAlgorithm,
pub fusion_strategy: FusionStrategy,
pub vector_weight: f32,
pub keyword_weight: f32,
pub path_patterns: Vec<String>,
pub similarity_threshold: f32,
pub cache_size: Option<usize>,
pub enable_query_expansion: bool,
pub enable_hierarchical_summary: bool,
pub max_community_levels: usize,
pub llm_model: Option<String>,
pub temperature: f32,
pub max_tokens: usize,
}Expand description
GraphRAG configuration
Fields§
§top_k: usizeNumber of seed nodes from vector search
max_seeds: usizeMaximum number of seeds after fusion
expansion_hops: usizeGraph expansion hops
max_subgraph_size: usizeMaximum subgraph size (triples)
max_context_triples: usizeMaximum triples to include in LLM context
enable_communities: boolEnable community detection
community_algorithm: CommunityAlgorithmCommunity detection algorithm
fusion_strategy: FusionStrategyFusion strategy
vector_weight: f32Weight for vector similarity scores (0.0 - 1.0)
keyword_weight: f32Weight for keyword/BM25 scores (0.0 - 1.0)
path_patterns: Vec<String>Path patterns for graph expansion (SPARQL property paths)
similarity_threshold: f32Similarity threshold for vector search
cache_size: Option<usize>Cache size for query results
enable_query_expansion: boolEnable query expansion
enable_hierarchical_summary: boolEnable hierarchical summarization
max_community_levels: usizeMaximum community levels for hierarchical summarization
llm_model: Option<String>LLM model to use for generation
temperature: f32Temperature for LLM generation
max_tokens: usizeMaximum tokens for LLM response
Trait Implementations§
Source§impl Clone for GraphRAGConfig
impl Clone for GraphRAGConfig
Source§fn clone(&self) -> GraphRAGConfig
fn clone(&self) -> GraphRAGConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GraphRAGConfig
impl Debug for GraphRAGConfig
Source§impl Default for GraphRAGConfig
impl Default for GraphRAGConfig
Source§impl<'de> Deserialize<'de> for GraphRAGConfig
impl<'de> Deserialize<'de> for GraphRAGConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GraphRAGConfig
impl RefUnwindSafe for GraphRAGConfig
impl Send for GraphRAGConfig
impl Sync for GraphRAGConfig
impl Unpin for GraphRAGConfig
impl UnwindSafe for GraphRAGConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more