Expand description
LLM-based search intent classification.
This module provides high-accuracy intent classification using language models. Classification includes a 200ms timeout by default for responsive user experience.
Structsยง
- LlmIntent
Response ๐ - LLM classification result structure.
Constantsยง
- LLM_
INTENT_ ๐PROMPT - Prompt template for LLM intent classification.
Functionsยง
- classify_
intent_ with_ llm - Classifies search intent using an LLM provider.
- extract_
json_ ๐from_ response - Extracts JSON from LLM response, handling markdown code blocks.
- parse_
llm_ ๐response - Parses LLM response into a
SearchIntent.