Sone-071 [DIRECT]
| Metric | Target | Alert | |--------|--------|-------| | smartsearch.suggestion.latency_ms (p95) | ≤ 300 ms | > 500 ms → PagerDuty | | smartsearch.suggestion.accuracy (acceptance / total) | ≥ 0.65 | < 0.55 →
| Step | Description | |------|-------------| | | Use a lightweight BERT‑based classifier (trained on 150k historic queries) to label intent: date_range , numeric_range , status , tag , custom_field . | | 2. Entity Detection | Run spaCy NER + custom regexes for amounts, dates (relative like “last month”, “Q1 2025”), IDs. | | 3. Filter Generation | Map intent+entities to filter JSON structures. | | 4. Scoring | Score each candidate with a logistic regression that factors: confidence from intent, entity match count, historical acceptance rate (per tenant). | | 5. Result Count Estimation | Issue a lightweight COUNT(*) query using the generated filter on the search index (cached for 30 s). | | 6. Feedback Loop | Store SUGGESTION_APPLIED or SUGGESTION_REJECTED events. Retrain the ranking model nightly. | SONE-071