GraphRAGConfig

Struct GraphRAGConfig 

Source
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: usize

Number of seed nodes from vector search

§max_seeds: usize

Maximum number of seeds after fusion

§expansion_hops: usize

Graph expansion hops

§max_subgraph_size: usize

Maximum subgraph size (triples)

§max_context_triples: usize

Maximum triples to include in LLM context

§enable_communities: bool

Enable community detection

§community_algorithm: CommunityAlgorithm

Community detection algorithm

§fusion_strategy: FusionStrategy

Fusion strategy

§vector_weight: f32

Weight for vector similarity scores (0.0 - 1.0)

§keyword_weight: f32

Weight for keyword/BM25 scores (0.0 - 1.0)

§path_patterns: Vec<String>

Path patterns for graph expansion (SPARQL property paths)

§similarity_threshold: f32

Similarity threshold for vector search

§cache_size: Option<usize>

Cache size for query results

§enable_query_expansion: bool

Enable query expansion

§enable_hierarchical_summary: bool

Enable hierarchical summarization

§max_community_levels: usize

Maximum community levels for hierarchical summarization

§llm_model: Option<String>

LLM model to use for generation

§temperature: f32

Temperature for LLM generation

§max_tokens: usize

Maximum tokens for LLM response

Trait Implementations§

Source§

impl Clone for GraphRAGConfig

Source§

fn clone(&self) -> GraphRAGConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GraphRAGConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for GraphRAGConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for GraphRAGConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for GraphRAGConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,