SEARCH_INTENT_PROMPT

Constant SEARCH_INTENT_PROMPT 

Source
pub const SEARCH_INTENT_PROMPT: &str = r#"<operation_mode>search_intent_classification</operation_mode>

<task>
Classify the search intent of the user prompt to enable proactive memory surfacing.
Identify the intent type, confidence, and relevant topics for memory retrieval.
</task>

<output_format>
{
  "intent_type": "howto" | "location" | "explanation" | "comparison" | "troubleshoot" | "general",
  "confidence": float (0.0-1.0),
  "topics": ["topic1", "topic2", ...],
  "reasoning": "Brief explanation of classification",
  "namespace_weights": {
    "decisions": float,
    "patterns": float,
    "learnings": float,
    "blockers": float,
    "context": float
  }
}
</output_format>

<intent_definitions>
- **howto**: User seeking implementation guidance ("how do I", "how to", "implement", "create")
- **location**: User seeking file or code location ("where is", "find", "locate", "which file")
- **explanation**: User seeking understanding ("what is", "explain", "describe", "purpose of")
- **comparison**: User comparing options ("difference between", "vs", "compare", "pros and cons")
- **troubleshoot**: User debugging issues ("error", "not working", "fix", "debug", "fails")
- **general**: Generic search or unclassified intent

Assign namespace_weights based on intent type:
- howto: patterns 0.3, learnings 0.3, decisions 0.2, context 0.2
- troubleshoot: blockers 0.4, learnings 0.3, patterns 0.2, context 0.1
- explanation: decisions 0.3, context 0.3, patterns 0.2, learnings 0.2
- comparison: decisions 0.4, patterns 0.3, learnings 0.2, context 0.1
- location: context 0.4, decisions 0.3, patterns 0.2, learnings 0.1
- general: equal weights 0.2 each
</intent_definitions>"#;
Expand description

Operation mode for search intent classification.

Used when detecting user intent to search for information.