Skip to main content

Crate cortex_retrieval

Crate cortex_retrieval 

Source
Expand description

Read-only retrieval — never mutates memory tables.

Re-exports§

pub use embedding::cosine_similarity;
pub use embedding::EmbedError;
pub use embedding::EmbedResult;
pub use embedding::Embedder;
pub use embedding::LocalStubEmbedder;
pub use embedding::OllamaEmbedder;
pub use embedding::DEFAULT_OLLAMA_EMBED_MODEL;
pub use embedding::DEFAULT_OLLAMA_ENDPOINT;
pub use embedding::NOMIC_EMBED_DIM;
pub use embedding::OLLAMA_BACKEND_ID_PREFIX;
pub use embedding::STUB_BACKEND_ID;
pub use embedding::STUB_DIM;
pub use fts5::compose_fuzzy_boost;
pub use fts5::normalize_bm25;
pub use fts5::query_fts5;
pub use fts5::Fts5Hit;
pub use fts5::FUZZY_BOOST_WEIGHT;
pub use lexical::LexicalDocument;
pub use lexical::LexicalExplanation;
pub use lexical::LexicalHit;
pub use lexical::LexicalIndex;
pub use resolve::resolve_conflicts;
pub use resolve::AuthorityLevel;
pub use resolve::AuthorityProofHint;
pub use resolve::ConflictingMemoryInput;
pub use resolve::PrecedenceEvidence;
pub use resolve::ProofClosureHint;
pub use resolve::ResolutionReason;
pub use resolve::ResolutionState;
pub use resolve::ResolverOutput;
pub use score::compose_lexical_semantic;
pub use score::score;
pub use score::DomainOverlapExplanation;
pub use score::HybridScoreExplanation;
pub use score::ScoreComponent;
pub use score::ScoreInputs;
pub use score::FTS5_WEIGHT_WITH_SEM;
pub use score::LEX_WEIGHT_WITH_SEM;
pub use score::SEM_WEIGHT_WITH_SEM;
pub use snippet::extract as extract_snippet;
pub use snippet::snippet_ansi_highlighted;
pub use snippet::snippet_plain_text;
pub use snippet::tokenize_query;
pub use snippet::Snippet;
pub use snippet::MAX_SNIPPET_CHARS;
pub use snippet::SNIPPET_LEAD_CHARS;

Modules§

embedding
Phase 4.C foundation: pluggable embedder trait + record shape.
fts5
Phase 4.B opt-in fuzzy retrieval over the FTS5 trigram mirror.
lexical
Minimal in-memory lexical retrieval over accepted memory documents.
resolve
Deterministic contradiction-resolution scaffold for retrieval.
score
Hybrid retrieval scoring and explanations.
snippet
Snippet extraction: highlighted text windows from memory claims for search result display.

Structs§

EmbedRecord
One persistable embedding row produced by an embedder backend.

Functions§

search_stub
Placeholder search hook (memory search --explain wiring starts here).