@@ -14,6 +14,7 @@ The framework follows a **separation of concerns** design:
1414
1515- ** ai-gateway** : Tests Semantic Router with Envoy AI Gateway integration
1616- ** aibrix** : Tests Semantic Router with vLLM AIBrix integration
17+ - ** dynamic-config** : Tests Semantic Router with Kubernetes CRD-based configuration (IntelligentRoute/IntelligentPool)
1718- ** istio** : Tests Semantic Router with Istio service mesh integration
1819- ** production-stack** : Tests vLLM Production Stack configurations (future)
1920- ** llm-d** : Tests Semantic Router with LLM-D distributed inference
4546│ ├── rule_condition_logic.go # Signal-decision: AND/OR operators
4647│ ├── decision_fallback.go # Signal-decision: Fallback behavior
4748│ ├── keyword_routing.go # Signal-decision: Keyword matching
48- │ └── plugin_config_variations.go # Signal-decision: Plugin configs
49+ │ ├── plugin_config_variations.go # Signal-decision: Plugin configs
50+ │ └── embedding_signal_routing.go # Signal-decision: Embedding signals
4951├── profiles/
50- │ └── ai-gateway/ # AI Gateway test profile
51- │ └── profile.go # Profile definition and environment setup
52+ │ ├── ai-gateway/ # AI Gateway test profile
53+ │ │ └── profile.go # Profile definition and environment setup
54+ │ ├── aibrix/ # AIBrix test profile
55+ │ │ └── profile.go
56+ │ └── dynamic-config/ # Dynamic CRD-based configuration profile
57+ │ ├── profile.go
58+ │ └── crds/ # IntelligentRoute and IntelligentPool CRDs
59+ │ ├── intelligentroute.yaml
60+ │ └── intelligentpool.yaml
5261└── README.md
5362```
5463
@@ -83,6 +92,7 @@ The framework includes the following test cases (all in `e2e/testcases/`):
8392| ` decision-fallback-behavior ` | Fallback to default decision when no match | 5 cases, fallback validation |
8493| ` keyword-routing ` | Keyword-based routing decisions | 6 cases, keyword matching (case-insensitive) |
8594| ` plugin-config-variations ` | Plugin configuration variations (PII allowlist, cache thresholds) | 6 cases, config validation |
95+ | ` embedding-signal-routing ` | EmbeddingSignal CRD routing with semantic similarity | 31 cases, PII/security/technical/domain routing accuracy |
8696
8797** Signal-Decision Engine Features Tested:**
8898
@@ -94,6 +104,7 @@ The framework includes the following test cases (all in `e2e/testcases/`):
94104- ✅ Per-decision plugin configurations
95105- ✅ PII allowlist handling
96106- ✅ Per-decision cache thresholds (0.75, 0.92, 0.95)
107+ - ✅ Embedding signal routing (semantic similarity-based routing via IntelligentRoute CRD)
97108
98109All test cases:
99110
@@ -346,6 +357,7 @@ Test data is stored in `e2e/testcases/testdata/` as JSON files. Each test case l
346357- ` cache_cases.json ` : 5 groups of similar questions for semantic cache testing
347358- ` pii_detection_cases.json ` : 10 PII types (email, phone, SSN, etc.)
348359- ` jailbreak_detection_cases.json ` : 10 attack types (prompt injection, DAN, etc.)
360+ - ` embedding_signal_cases.json ` : 31 test cases for EmbeddingSignal routing (PII, security, technical, domain classification)
349361
350362** Signal-Decision Engine Tests** use embedded test cases (defined inline in test files) to validate:
351363
@@ -356,6 +368,49 @@ Test data is stored in `e2e/testcases/testdata/` as JSON files. Each test case l
356368- Keyword-based routing (6 test cases)
357369- Plugin configuration variations (6 test cases)
358370
371+ ### Embedding Signal Routing
372+
373+ The ` embedding-signal-routing ` test validates the ` IntelligentRoute ` CRD with ` EmbeddingSignal ` configurations. This test:
374+
375+ ** Features Tested:**
376+
377+ - Semantic similarity-based routing using embedding models (Qwen3/Gemma)
378+ - PII detection via embedding signals (semantic patterns like "share my credit card")
379+ - Security threat detection (SQL injection, unauthorized access attempts)
380+ - Technical domain routing (Kubernetes, container orchestration)
381+ - Domain classification (healthcare, finance, general knowledge)
382+ - Threshold behavior (0.75 similarity threshold)
383+ - Aggregation methods (max similarity across multiple candidates)
384+ - Paraphrase handling (different wording, same intent)
385+ - Multi-signal evaluation (multiple signals in one request)
386+
387+ ** Test Categories:**
388+
389+ - PII Detection (7 cases): Semantic PII pattern matching
390+ - Security Threats (4 cases): Malicious intent detection
391+ - Technical Topics (4 cases): Kubernetes-specific routing
392+ - Domain Classification (4 cases): Healthcare, finance domains
393+ - Threshold Tests (3 cases): Similarity boundary testing
394+ - Aggregation Tests (2 cases): Multi-candidate matching
395+ - Paraphrase Tests (2 cases): Intent recognition
396+ - Multi-signal (1 case): Combined signal evaluation
397+ - Edge Cases (4 cases): Empty content, short/long queries
398+
399+ ** Profile Support:**
400+
401+ - ✅ ` dynamic-config ` profile (uses CRDs)
402+ - ❌ ` ai-gateway ` profile (uses static YAML config)
403+ - ❌ ` aibrix ` profile (uses static YAML config)
404+
405+ ** Requirements:**
406+
407+ - Embedding models must be initialized (Qwen3 or Gemma)
408+ - ` EMBEDDING_MODEL_OVERRIDE=qwen3 ` environment variable for consistent test results
409+ - IntelligentRoute CRD with EmbeddingSignal definitions
410+ - Model requests must use ` "model": "auto" ` to trigger decision evaluation
411+
412+ ** Note:** This test differs from ` pii-detection ` (which uses regex/NER plugins) and ` domain-classify ` (which uses academic domain routing). Embedding signals use semantic similarity to detect ** intent** rather than exact patterns.
413+
359414** Test Data Format Example:**
360415
361416``` json
0 commit comments