pub struct AnswerContext {
pub primary_chunks: Vec<SearchResult>,
pub supporting_chunks: Vec<SearchResult>,
pub hierarchical_summaries: Vec<QueryResult>,
pub entities: Vec<String>,
pub confidence_score: f32,
pub source_count: usize,
}Expand description
Context information assembled from search results
Fields§
§primary_chunks: Vec<SearchResult>Primary search result chunks with high relevance scores
supporting_chunks: Vec<SearchResult>Supporting search result chunks with moderate relevance scores
hierarchical_summaries: Vec<QueryResult>Hierarchical summaries from the knowledge graph
entities: Vec<String>List of entities mentioned in the context
confidence_score: f32Overall confidence score for the context quality
source_count: usizeTotal count of sources used in this context
Implementations§
Source§impl AnswerContext
impl AnswerContext
Sourcepub fn get_combined_content(&self) -> String
pub fn get_combined_content(&self) -> String
Combine all content into a single text block
Sourcepub fn get_sources(&self) -> Vec<SourceAttribution>
pub fn get_sources(&self) -> Vec<SourceAttribution>
Get source attribution information
Trait Implementations§
Source§impl Clone for AnswerContext
impl Clone for AnswerContext
Source§fn clone(&self) -> AnswerContext
fn clone(&self) -> AnswerContext
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 AnswerContext
impl Debug for AnswerContext
Auto Trait Implementations§
impl Freeze for AnswerContext
impl RefUnwindSafe for AnswerContext
impl Send for AnswerContext
impl Sync for AnswerContext
impl Unpin for AnswerContext
impl UnsafeUnpin for AnswerContext
impl UnwindSafe for AnswerContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more