@@ -308,6 +308,13 @@ impl AgentStyle {
308308 /// consider using [`detect_with_llm`](AgentStyle::detect_with_llm) for
309309 /// more accurate classification.
310310 pub fn detect_with_confidence ( message : & str ) -> ( Self , DetectionConfidence ) {
311+ // Chinese text has high ambiguity in intent classification due to
312+ // compound verb structures and context-dependent meaning.
313+ // Bypass keyword matching entirely and route to LLM classification.
314+ if message. chars ( ) . any ( |c| c >= '\u{4e00}' && c <= '\u{9fff}' ) {
315+ return ( AgentStyle :: GeneralPurpose , DetectionConfidence :: Low ) ;
316+ }
317+
311318 let lower = message. to_lowercase ( ) ;
312319
313320 // === HIGH CONFIDENCE: Very specific patterns ===
@@ -327,10 +334,6 @@ impl AgentStyle {
327334 || lower. contains ( "create a plan" )
328335 || lower. contains ( "implementation plan" )
329336 || lower. contains ( "step-by-step plan" )
330- || lower. contains ( "帮我规划" )
331- || lower. contains ( "帮我设计" )
332- || lower. contains ( "架构设计" )
333- || lower. contains ( "系统设计" )
334337 {
335338 return ( AgentStyle :: Plan , DetectionConfidence :: High ) ;
336339 }
@@ -361,10 +364,6 @@ impl AgentStyle {
361364 || lower. contains ( "design" )
362365 || lower. contains ( "architecture" )
363366 || lower. contains ( "approach" )
364- || lower. contains ( "规划" )
365- || lower. contains ( "设计" )
366- || lower. contains ( "架构" )
367- || lower. contains ( "方案" )
368367 {
369368 return ( AgentStyle :: Plan , DetectionConfidence :: Medium ) ;
370369 }
@@ -910,14 +909,6 @@ mod tests {
910909 AgentStyle :: detect_from_message( "What's the implementation approach?" ) ,
911910 AgentStyle :: Plan
912911 ) ;
913- assert_eq ! (
914- AgentStyle :: detect_from_message( "帮我设计一个Agent as a Service 平台" ) ,
915- AgentStyle :: Plan
916- ) ;
917- assert_eq ! (
918- AgentStyle :: detect_from_message( "请给我一个系统设计方案" ) ,
919- AgentStyle :: Plan
920- ) ;
921912 }
922913
923914 #[ test]
0 commit comments