Name Last Update
..
ecommerce Loading commit data...
petstore Loading commit data...
README.md Loading commit data...

Benchmarks

Evaluation datasets and production evaluation results for intent-fusion.

Datasets

Dataset Intents Cases Source Language
ecommerce/ 10 20 Synthetic English
petstore/ 15 52 Production (desensitized) English

Running a benchmark

# Set your LLM API key
export OPENAI_API_KEY=sk-...

# Run the e-commerce benchmark
python benchmarks/ecommerce/run_benchmark.py

# Run the pet store benchmark
python benchmarks/petstore/run_benchmark.py

# Override model or parameters
python benchmarks/petstore/run_benchmark.py --model deepseek-chat --alpha 0.15

Calibration

To find the optimal alpha and delta for your own dataset:

python -m intent_fusion.calibration \
    --cases benchmarks/petstore/cases.yaml \
    --intents benchmarks/petstore/intents.yaml \
    --output calibration_results.csv

Production Evaluation

Full evaluation on a production retail management SaaS with 57 registered intents across 7 domains and 140 labeled end-to-end routing cases. Domain names and intent identifiers below are desensitized.

Methodology

  • Test harness: End-to-end routing through the full pipeline (problem-type → domain hint → dual-channel fusion → structural validation → routing decision)
  • Case categories: positive (standard expressions), boundary (colloquial / informal phrasing), confuse (deliberately misleading inputs)
  • Initial set: 104 cases (32 queries + 19 write ops + 10 tasks + others)
  • Extended set: 140 cases (+36 colloquial boundary cases, 3–5 per domain)

Phase 1 — Single-Model Baselines (104 cases)

Three LLM providers tested as the sole intent classification channel:

Metric Model A (fast) Model B (balanced) Model C (strong)
Accuracy 80.8% (84/104) 82.7% (86/104) 86.5% (90/104)
Failures 20 18 14
Total time 232s 628s 1567s
Avg latency 2.2s/case 6.0s/case 15.1s/case*

*Model C ran in fallback mode (primary → timeout → fallback), inflating latency. Higher accuracy may partly reflect a reduced routing surface due to incomplete permission configuration during the test.

Per-domain breakdown | Domain | Model A | Model B | Model C | Notes | |--------|---------|---------|---------|-------| | Users | 89% (32/36) | 83% (30/36) | 92% (33/36) | | | Catalog | 100% (6/6) | 100% (6/6) | 100% (6/6) | All models perfect | | Promotion | 60% (3/5) | 60% (3/5) | 60% (3/5) | All fail on "create campaign" | | General | 85% (11/13) | 92% (12/13) | 77% (10/13) | | | Transactions | 88% (7/8) | 88% (7/8) | 88% (7/8) | Identical across models | | Analytics | 47% (7/15) | 60% (9/15) | 87% (13/15) | **Largest variance** | | Services | 100% (7/7) | 100% (7/7) | 100% (7/7) | All models perfect | | Inventory | 79% (11/14) | 86% (12/14) | 79% (11/14) | |
Per-category breakdown | Category | Model A | Model B | Model C | |----------|---------|---------|---------| | positive | 83% (69/83) | 84% (70/83) | 92% (76/83) | | boundary | 82% (9/11) | 91% (10/11) | 64% (7/11) | | confuse | 60% (6/10) | 60% (6/10) | 70% (7/10) |

Phase 2 — Dual-Channel Fusion A/B Test (104 cases)

Dual-channel fusion vs. Model A (fastest single-model baseline, used in production):

Metric Model A (single) Dual-channel Fusion Change
Overall 80.8% (84/104) 87.5% (91/104) +6.7%
Analytics 47% (7/15) 80% (12/15) +33%
Inventory 79% (11/14) 93% (13/14) +14%
Users 89% (32/36) 86% (31/36) −3%
Catalog / Services 100% 100% —

Phase 3 — Extended Regression (140 cases)

Added 36 colloquial boundary cases (3–5 per domain) and fixed 5 system-level issues (missing domain hints, suboptimal embed_text for certain intents):

Metric Phase 2 (104 cases) Phase 3 (140 cases) Notes
Overall 87.5% (91/104) 97.1% (136/140) +9.6% (includes new cases + fixes)

Per-domain results:

Domain Accuracy Notes
Users 100% (43/43) +5 colloquial cases, all passed
Catalog 70% (7/10) 3 failures contain pronouns requiring context
Promotion 100% (8/8)
General 100% (15/15) Includes free chat, guide, strategy
Transactions 100% (12/12)
Analytics 100% (21/21) From initial 47% → 100%, largest improvement
Services 91% (10/11) 1 failure: pronoun requiring context
Inventory 100% (20/20)

Failure Analysis

All 4 remaining failures are boundary cases containing pronouns that require conversation context:

Message (translated) Expected Actual Analysis
"how much is that one" query_item_detail query_catalog "that" needs context; both intents reasonable
"raise the price on that" modify_item_price strategy_advice "that" needs context to know it's an item operation
"take this off the shelf" toggle_item_listing strategy_with_data "this" needs context to know it's an item operation
"when is that one ready" query_booking query_service_detail pronoun ambiguity between booking vs. service

Conclusion: All remaining failures belong to the dialogue context layer (entity resolution from conversation history). The intent recognition layer itself has no remaining systematic weaknesses.


Representative Cross-Model Failures (Phase 1)

Selected cases showing how different models fail differently on the same inputs (✓ = pass, ✗ → actual routing):

# Message Expected Model A Model B Model C
1 "add points" add_loyalty_points ✗ free_chat ✓ ✓
2 "sign up for membership" register_membership ✗ guide_search ✓ ✗ guide_search
3 "top up" top_up_account ✓ ✗ guide_search ✗ guide_search
4 "inventory count" inventory_check ✓ ✓ ✗ guide_search
5 "how's business this month" task:daily_report ✗ free_chat ✓ ✓
6 "how were today's sales" task:daily_report ✗ free_chat ✗ free_chat ✓
7 "spending overview" task:daily_report ✗ query_user ✗ query_user_analysis ✓
8 "which users are churning" task:churn_alert ✗ free_chat ✗ free_chat ✓
9 "which categories profit most" task:profit_analysis ✗ task:top_sellers ✗ free_chat ✓
10 "best sellers ranking" task:top_sellers ✗ free_chat ✗ free_chat ✓
11 "what should we restock" task:restock_suggestion ✗ free_chat ✗ free_chat ✗ strategy_with_data
12 "good morning" task:morning_dashboard ✓ ✓ ✗ strategy_with_data
13 "how to profit next month" strategy_advice ✗ free_chat ✗ free_chat ✗ free_chat
14 "create a discount campaign" guide_search ✗ query_promotions ✗ free_chat ✗ free_chat

Key observations:

  • No single model dominates — each has unique failure patterns
  • Even the strongest model fails on 14/104 cases, including cases all three models miss
  • Colloquial / indirect phrasing is the primary failure mode (e.g., "spending overview" → should be daily_report, classified as user query)
  • Models disagree on 73% of failures — only 4 out of 27 failed cases are shared across all three models
  • Dual-channel fusion addresses this by combining embedding keyword recall with LLM semantic reasoning