pub struct Skill {
pub id: String,
pub name: String,
pub description: String,
pub body_head: String,
pub keywords: Vec<String>,
pub trigger_phrases: Vec<String>,
pub path: PathBuf,
pub hash: String,
}Fields§
§id: StringUnique id (the skill’s declared name).
name: String§description: String§body_head: StringFirst few prose lines of the body — dense topical signal that disambiguates
confusable descriptions without the dilution of the full document. Read by
the stage-2 cross-encoder alongside description (see Skill::doc_text);
the stage-1 index embeds the description alone.
keywords: Vec<String>Keywords for the hybrid keyword boost: explicit keywords/aliases
frontmatter, plus tokens derived from the name.
trigger_phrases: Vec<String>Multi-word trigger phrases mined from the description’s quoted spans (the
literal wording a skill says to invoke it on, e.g. "find that online").
Each is normalized to its content tokens; the ranker boosts a skill when a
prompt contains all of a phrase’s tokens. See extract_phrases.
path: PathBuf§hash: StringContent hash for index cache invalidation.
Implementations§
Source§impl Skill
impl Skill
Sourcepub fn doc_text(&self) -> String
pub fn doc_text(&self) -> String
Document text for the stage-2 cross-encoder: the curated description plus the body head — more topical signal for the reranker’s joint read than the one-line description alone. (Stage-1 retrieval embeds the description only; its thresholds are calibrated to that distribution.)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Skill
impl RefUnwindSafe for Skill
impl Send for Skill
impl Sync for Skill
impl Unpin for Skill
impl UnsafeUnpin for Skill
impl UnwindSafe for Skill
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
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>
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