pub enum SemanticRepresentation {
Symmetric,
Document,
Query,
}Expand description
Allows you to choose a semantic representation fitting for your usecase.
Variants§
Symmetric
Useful for comparing prompts to each other, in use cases such as clustering, classification,
similarity, etc. Symmetric embeddings are intended to be compared with other Symmetric
embeddings.
Document
Document and Query are used together in use cases such as search where you want to
compare shorter queries against larger documents. Document embeddings are optimized for
larger pieces of text to compare queries against.
Query
Document and Query are used together in use cases such as search where you want to
compare shorter queries against larger documents. Query embeddings are optimized for
shorter texts, such as questions or keywords.
Trait Implementations§
source§impl Debug for SemanticRepresentation
impl Debug for SemanticRepresentation
Auto Trait Implementations§
impl Freeze for SemanticRepresentation
impl RefUnwindSafe for SemanticRepresentation
impl Send for SemanticRepresentation
impl Sync for SemanticRepresentation
impl Unpin for SemanticRepresentation
impl UnwindSafe for SemanticRepresentation
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> 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