(question: str, scope: str)
| 4219 | if normalized_question.startswith(_DIRECT_STARTERS): |
| 4220 | return "direct", "general_question" |
| 4221 | return "direct", "no_local_context_signal" |
| 4222 | |
| 4223 | |
| 4224 | def _is_trend_question(question: str) -> bool: |
| 4225 | normalized = str(question or "").strip().lower() |
| 4226 | if not normalized: |
| 4227 | return False |
| 4228 | return any(term in normalized for term in _TREND_QUESTION_TERMS) |
| 4229 | |
| 4230 | |
| 4231 | def _should_pin_recent_papers(question: str, scope: str) -> bool: |
| 4232 | normalized = str(question or "").strip().lower() |
| 4233 | normalized_scope = str(scope or "").strip().lower() |
no test coverage detected