Skip to main content

extract_keywords_hybrid

Function extract_keywords_hybrid 

Source
pub async fn extract_keywords_hybrid(
    context: &str,
    fast_provider: Option<&dyn Provider>,
) -> Vec<String>
Expand description

Extract keywords from context with hybrid approach.

Strategy:

  1. First use rule-based stop word filtering (fast, zero cost)
  2. If result is insufficient (too few keywords), fall back to AI extraction
  3. Behavior controlled by MEMORY_AI_KEYWORDS env var (auto/always/never)