Skip to content

[Enhancement] Intent Classification to Route Queries Correctly #2

@Smilin01

Description

@Smilin01

Problem

All queries go through the full search + RAG pipeline, even ones that don't need web search
(e.g., "explain recursion", "what is 2+2", "hello").

Expected Behavior

Classify intent before routing:

Intent Action
Factual / Current Events Full search + RAG
Conceptual / Definitional LLM-only (skip search)
Math / Code Structured generation
Greeting / Chitchat Lightweight response
Ambiguous Search with low confidence flag

Why It Matters

  • Reduces unnecessary SearXNG calls (critical since we self-host)
  • Faster response for non-search queries
  • Lower Groq token usage

Suggested Approach

  • Use llama-3.1-8b-instant as a fast intent classifier (single prompt, JSON output)
  • Gate the search pipeline on intent result

Labels

enhancement performance good first issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions