pub struct RagConfig {
pub chunking: ChunkingStrategy,
pub top_k: usize,
pub min_relevance_score: f32,
pub include_metadata: bool,
pub max_context_tokens: usize,
}Expand description
Configuration for the RAG pipeline.
Fields§
§chunking: ChunkingStrategyHow to split ingested documents.
top_k: usizeDefault number of top results to return.
min_relevance_score: f32Minimum relevance score (0.0 – 1.0) for a chunk to be included.
include_metadata: boolWhether to include document metadata in the formatted context.
max_context_tokens: usizeMaximum estimated tokens for the combined context window.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RagConfig
impl<'de> Deserialize<'de> for RagConfig
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 RagConfig
impl RefUnwindSafe for RagConfig
impl Send for RagConfig
impl Sync for RagConfig
impl Unpin for RagConfig
impl UnsafeUnpin for RagConfig
impl UnwindSafe for RagConfig
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