# Hybrid Fusion Refinement Results

**Date:** January 14, 2026
**Refinement Version:** 1.1.0-hybrid-fusion
**Baseline Reference:** `baseline_1768364165529`

## Summary

Implemented two key refinements to address findings from the cross-provider baseline evaluation:

1. **Pre-Fusion Score Normalization** - Convert all provider scores to percentile within source
2. **Hybrid RRF + Score Fusion** - Combine position-based RRF with normalized confidence scores

## Problem Statement

The baseline evaluation revealed that each provider normalizes scores differently:

```
Original Score Ranges (Baseline):
Provider   | Min    | Max    | Mean   | StdDev
-----------|--------|--------|--------|--------
Brave      | 0.0145 | 0.0186 | 0.0172 | 0.0011
Serper     | 0.0145 | 0.0164 | 0.0154 | 0.0006
Tavily     | 0.0145 | 0.0167 | 0.0155 | 0.0007
Linkup     | 0.0143 | 0.0164 | 0.0153 | 0.0007
```

**Issues:**
- All scores cluster in narrow 0.014-0.019 range
- Standard deviation of ~0.0007 means scores are nearly identical
- Pure RRF fusion discards these semantic relevance signals

## Solution

### 1. Pre-Fusion Score Normalization

Normalize scores within each source to 0-1 range using min-max scaling:

```typescript
normalizedScore = (score - minScore) / (maxScore - minScore)
```

**Post-Normalization Score Ranges:**
```
Provider   | Min    | Max    | Mean   | StdDev
-----------|--------|--------|--------|--------
Brave      | 0.566  | 0.990  | 0.831  | 0.145
Serper     | 0.522  | 0.990  | 0.865  | 0.151
Tavily     | 0.522  | 1.000  | 0.881  | 0.143
Linkup     | 0.514  | 0.990  | 0.754  | 0.167
```

**Improvement:** StdDev increased from ~0.0007 to ~0.15 (200x more discriminative)

### 2. Hybrid RRF + Score Fusion

Replace pure RRF with hybrid formula:

```typescript
finalScore = alpha * normalizedRRF + (1 - alpha) * avgNormalizedScore
```

Where:
- `alpha = 0.6` (position-based ranking dominates)
- `normalizedRRF` = RRF score normalized to 0-1 range
- `avgNormalizedScore` = average of normalized scores across providers

**Benefits:**
- High-confidence results from any provider get boosted
- Position-based ranking from RRF still dominates (60% weight)
- Semantic relevance signals preserved (40% weight)

## Results Comparison

| Metric | Baseline | Post-Refinement | Change |
|--------|----------|-----------------|--------|
| **URL Overlap** | 24.3% | 25.6% | +1.3% |
| **Title Overlap** | 12.0% | 13.7% | +1.7% |
| **Ranking Agreement** | 16.6% | 21.3% | **+28%** |
| **Duplicate Rate** | 41.0% | 42.2% | +1.2% |
| **Avg Score Range** | 0.014-0.019 | 0.5-1.0 | **Meaningful** |

## Sample Hybrid Fusion Output

```
[applyHybridRRF] Top 3:
  1. Venture Capital Financings... (hybrid=0.990, rrf=0.984, norm=1.000)
  2. Tech Funding News | Global... (hybrid=0.936, rrf=0.968, norm=0.889)
  3. Startups | TechCrunch...     (hybrid=0.883, rrf=0.952, norm=0.778)
```

Each result now shows:
- `hybrid`: Final combined score
- `rrf`: Position-based component
- `norm`: Semantic confidence component

## Implementation Details

### Files Modified

| File | Changes |
|------|---------|
| `orchestrator.ts` | Added `HYBRID_ALPHA`, `normalizeScoresPerSource()`, `applyHybridRRF()` |
| `types.ts` | Added hybrid score metadata fields |

### Pipeline Order

```
1. Query expansion
2. Parallel source retrieval
3. Source boosting
4. Score normalization (NEW)
5. Hybrid RRF + Score fusion (ENHANCED)
6. Deduplication
7. LLM reranking (if enabled)
8. Recency bias
```

## Tuning Parameters

| Parameter | Value | Description |
|-----------|-------|-------------|
| `HYBRID_ALPHA` | 0.6 | Weight for RRF component (0-1) |
| `RRF_K` | 60 | RRF constant (higher = more weight to lower ranks) |

To adjust fusion behavior:
- Higher `HYBRID_ALPHA` → More position-based ranking
- Lower `HYBRID_ALPHA` → More semantic confidence influence

## Recommendations for Future Work

1. **A/B Testing**: Run hybrid vs pure RRF in production to measure click-through impact
2. **Dynamic Alpha**: Adjust alpha based on query type (factual vs exploratory)
3. **Embedding Deduplication**: Use cosine similarity for semantic duplicate detection (threshold 0.85)
4. **Provider-Specific Weights**: Weight sources by historical accuracy per query type

---

*Generated by NodeBench AI Cross-Provider Evaluation Harness v1.1.0*
