Skip to main content

classify

Function classify 

Source
pub fn classify(prompt: &str) -> &'static str
Expand description

Classify a prompt for the legacy DeepSeek candidate pair.

Uses a simple scoring system:

  • Strong complex keyword: +3
  • Medium complex keyword: +1
  • Simple keyword: -1
  • Prompt length > 500 chars: +2, > 200 chars: +1
  • Contains code fence or backtick: +1
  • Contains a file path: +1
  • Multi-line (> 5 newlines): +1

Total ≥ 2 → PRO_MODEL, else → FLASH_MODEL.