Catalog/rag-weighted-score-fusion

Retrieval

Weighted score fusion API

Linearly combines per-source relevance scores with weights (optional min-max normalization) into one fused ranking. Answers 'How do I blend BM25 and vector scores?', 'What is the weighted score fusion?'.

Price$0.02per request
MethodPOST
Route/v1/retrieval/weighted-score-fusion
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
fusionweightedhybrid-searchscorererankensembleretrievalrag
API URLhttps://x402.hexl.dev/v1/retrieval/weighted-score-fusion
Integration docs
Example request
{
  "sources": [
    [
      {
        "id": "x",
        "score": 1
      },
      {
        "id": "y",
        "score": 0.5
      }
    ],
    [
      {
        "id": "x",
        "score": 0.5
      }
    ]
  ],
  "weights": [
    1,
    2
  ]
}
Example response
{
  "weights": [
    1,
    2
  ],
  "normalize": false,
  "fused": [
    {
      "id": "x",
      "fusedScore": 2
    },
    {
      "id": "y",
      "fusedScore": 0.5
    }
  ],
  "formula": "score(d) = Σ w_i · score_i(d)"
}
Input schema
{
  "type": "object",
  "required": [
    "sources"
  ],
  "properties": {
    "sources": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "object"
        }
      }
    },
    "weights": {
      "type": "array",
      "items": {
        "type": "number"
      }
    },
    "normalize": {
      "type": "boolean"
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}