Sone-071 (2024)
Returns list of saved smart‑searches for the authenticated user.
"userId": "string",
"tenantId": "string",
"timestamp": "epoch-millis",
"eventType": "enum[QUERY, SUGGESTION_SHOWN, SUGGESTION_APPLIED, SUGGESTION_REJECTED, SEARCH_EXECUTED]",
"queryText": "string",
"suggestedFilters": [ "type":"string", "label":"string", "estimatedCount": "int" ],
"appliedFilter": "type":"string","label":"string",
"sessionId": "string"
| # | Requirement | Metric / Test | |---|-------------|---------------| | NFR‑001 | Latency – suggestion API ≤ 300 ms (95th percentile) | Load test with 500 concurrent users | | NFR‑002 | Accuracy – ≥ 85 % of suggestions match the “gold‑standard” filter set generated by data‑science team | Offline evaluation on a held‑out dataset | | NFR‑003 | Accessibility – all interactive elements reachable via keyboard, ARIA‑labelled, WCAG 2.1 AA | Axe automated scan + manual testing | | NFR‑004 | Internationalisation – UI strings externalised, support for EN, ES, FR, DE | Regression test on locale switch | | NFR‑005 | Security – no injection via free‑text queries, all inputs sanitized | OWASP ZAP scanning | | NFR‑006 | GDPR – any saved Smart‑Searches stored with user consent flag; deletable on request | Data‑privacy audit | SONE-071
| Step | Description |
|------|-------------|
| 1. Intent Extraction | 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. | Returns list of saved smart‑searches for the authenticated
Deployment
| # | As a … | I want … | So that … |
|---|--------|----------|-----------|
| US‑01 | Product marketer | A “New Notification” wizard that asks for channel, audience filter, schedule (date‑time or recurring), and message template | I can launch a campaign without developer help |
| US‑02 | Product marketer | Time‑zone aware scheduling (auto‑detect from user profile) | Recipients receive the message at a sensible local hour |
| US‑03 | Product marketer | Dynamic token insertion (first_name, plan_type, last_login) | Messages feel personal, driving higher CTR |
| US‑04 | Product marketer | Delivery throttling (max 3 per user per 24 h, 10 per week) | We avoid spamming and stay under compliance limits |
| US‑05 | Customer Success | Audit log showing who created/modified a schedule, timestamps, and version diff | We can investigate any delivery issues or compliance queries |
| US‑06 | Data Engineer | Metrics endpoint (/notifications/metrics) exposing sent, delivered, opened, click‑through counts per schedule | We can monitor campaign health in our dashboard |
| US‑07 | QA Engineer | Test harness to simulate time‑zone based deliveries & throttling | Automated regression coverage | | # | Requirement | Metric / Test
| # | As a … | I want … | So that … | |---|--------|----------|-----------| | US‑001 | End‑user (any role) | to type a free‑text query and instantly see a list of suggested filters (date range, status, numeric ranges, tags, custom fields) | I don’t have to manually add filters; I can get precise results faster. | | US‑002 | End‑user | to preview how many results each suggested filter will return before I apply it | I can decide whether a filter is worth using. | | US‑003 | End‑user | to apply a suggested filter with a single click and see the results instantly | My workflow stays fluid; I’m not interrupted by extra steps. | | US‑004 | End‑user | to undo any automatically applied filter (single “undo” button) | I can experiment without fear of losing data. | | US‑005 | Power‑user | to pin frequently used filter combinations as “Saved Smart‑Searches” | I can reuse complex queries with a single click. | | US‑006 | Data‑science / Product analyst | to see aggregate metrics on suggestion acceptance/rejection rates per user segment | We can measure the usefulness of the feature and feed it back into the ML model. | | US‑007 | Admin | to toggle the Smart‑Search feature on/off per tenant | We can roll it out gradually or disable it for customers that need a strict UI. | | US‑008 | End‑user | to get natural‑language help (e.g., “What does “last quarter” mean?” tooltip) | I understand the implicit logic behind the suggestions. |