GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: server-side hybrid retrieval fusion (vector.fuse with RRF/DBSF/LINEAR) · Issue #4066 · ArcadeData/arcadedb

feat: server-side hybrid retrieval fusion (vector.fuse with RRF/DBSF/LINEAR) #4066

New issue
Copy link
New issue
Copy link
Closed
Feature
Closed
feat: server-side hybrid retrieval fusion (vector.fuse with RRF/DBSF/LINEAR)#4066
Feature
Copy link
Assignees
lvca
Labels
enhancementNew feature or requestfeaturesql
Milestone
26.5.1

Description

@lvca
lvca
opened on May 3, 2026
Issue body actions

Feature Request: Server-side Hybrid Fusion (vector.fuse)

Originated from discussion #4044 (Qdrant to ArcadeDB migration).

Overview

Add a server-side multi-source fusion operator so a single SQL statement can combine ranked results from multiple indexes (dense vector + sparse vector + full-text + payload-based) and reduce them with a fusion strategy.

Today, hybrid retrieval requires two roundtrips and client-side reranking. After this issue, it is one query, fully composable with the rest of SQL.

The design generalizes Qdrant's Query API prefetch + FusionQuery to any source that yields ranked rows. The generic shape ("fuse N ranked sub-pipelines into one ranked output") is intentional, so it is not tied to dense+sparse hybrid alone.

Design

SQL surface

A new SQL function vector.fuse taking:

  1. An array of sub-pipelines, each a sub-SELECT yielding @rid plus $score.
  2. An options map with the fusion strategy and parameters.
SELECT * FROM `vector.fuse`(
  [
    (SELECT @rid, $score FROM `vector.neighbors`('Doc[dense_emb]', $denseVec, 50)),
    (SELECT @rid, $score FROM `vector.sparseNeighbors`('Doc[tokens,weights]', $qIdx, $qVal, 50)),
    (SELECT @rid, $score FROM Doc WHERE SEARCH_INDEX('Doc[content]', $queryText) = true)
  ],
  { fusion: 'RRF', k: 60, weights: [1.0, 1.0, 0.5], groupBy: 'source_file', groupSize: 1 }
) LIMIT 10

The fused output is itself a ResultSet, so it composes with outer WHERE, ORDER BY, LIMIT, joins, and projections.

Fusion strategies

  • RRF (Reciprocal Rank Fusion). score = Σ_i weight_i / (k + rank_i) with default k = 60 and default per-source weight 1.0. This is the default.
  • DBSF (Distribution-Based Score Fusion, Qdrant v1.11+). Per-source score normalization to [mean - 3σ, mean + 3σ], then weighted sum. Useful when sources produce comparable score distributions.
  • LINEAR. score = Σ_i weight_i · score_i after per-source min-max normalization. Covers the existing vector.hybridScore use case wrapped in the fusion shape.

The fusion key dispatches; per-strategy parameters live in the same options map.

Source contract

Any sub-pipeline yielding (@rid, $score) rows in ranked order is a valid source. This covers:

  • vector.neighbors (dense)
  • vector.sparseNeighbors (sparse, see feat: LSM_SPARSE_VECTOR index for sparse embedding retrieval #4065)
  • SEARCH_INDEX (full-text)
  • Any plain SELECT ... ORDER BY <expr> DESC LIMIT N

If $score is missing, sources are treated as rank-only (RRF still works, DBSF and LINEAR do not).

Group-by integration

groupBy and groupSize in the fuse options apply after fusion (matching Qdrant's query_points_groups semantics, where grouping is the outermost step). Per-source groupBy remains available via each source's own options, so callers can diversify before fusion (per source) or after fusion (across sources), as needed.

Implementation notes

  • Fusion is an executor step that consumes its child result sets, builds a RID -> per-source-rank/score table, computes the fused score, and emits a sorted result set.
  • Sub-pipelines run in parallel by default; parallel: false option to force sequential execution if a source has side effects.
  • Score-only sources (no @rid) are rejected at planning time with a clear error.

Acceptance criteria

  • New SQL function vector.fuse(sources, options) accepting ≥2 sub-pipelines.
  • Each source must yield rows with @rid and $score.
  • Fusion strategies: RRF (with k, weights), DBSF, LINEAR.
  • Composable with vector.neighbors, vector.sparseNeighbors, SEARCH_INDEX, plain SELECT ... ORDER BY.
  • groupBy + groupSize options applied after fusion.
  • Outer SQL can wrap the fuse with WHERE, LIMIT, ORDER BY, projections.
  • Tests: dense+sparse, dense+fulltext, three-way, weighted RRF, DBSF, LINEAR.
  • Doc page with worked examples covering each strategy.

Out of scope (future work)

  • Nested fusion (fusion of fusions). Qdrant supports nested prefetches; this would be a follow-up.
  • Cross-type / cross-collection fusion (joining ranked results across multiple types in one fuse). Possible today via UNION-style sources but not optimized.
  • Auto-tuning of weights from labeled data.

Related

  • Discussion: Migrating from Qdrant to ArcadeDB — stuck on sparse vector indexing and server-side hybrid search #4044
  • Companion issues: feat: LSM_SPARSE_VECTOR index for sparse embedding retrieval #4065 (LSM_SPARSE_VECTOR index), feat: groupBy/groupSize options on vector.neighbors for diversified retrieval #4067 (groupBy on vector.neighbors).

cc @astarso

Activity

  1. lvca
    added
    enhancementNew feature or request
    sql
    feature
    on May 3, 2026
  2. lvca
    self-assigned this
    on May 3, 2026
  3. lvca
    added the
    Feature
    issue type on May 3, 2026
  4. lvca
    added this to the 26.5.1 milestone on May 4, 2026
  5. lvca
    added a commit that references this issue on May 4, 2026

    feat: sparse vector index + hybrid fusion + group-by (#4065, #4066, #…

    66d6757
  6. lvca commented on May 4, 2026

    @lvca
    lvca
    on May 4, 2026
    MemberAuthor
    More actions

    All functional criteria + 9 strategy tests;

  7. lvca
    closed this as completedon May 4, 2026
  8. robfrank
    added a commit that references this issue on May 12, 2026

    feat: sparse vector index + hybrid fusion + group-by (#4065, #4066, #…

    61bd923
  9. tae898
    added a commit that references this issue on Jun 28, 2026

    feat: sparse vector index + hybrid fusion + group-by (ArcadeData#4065, …

    c9d3172
  10. mergify
    added a commit that references this issue on Aug 10, 2026

    chore(deps): bump the github-actions group with 5 updates [skip ci]

    a681f37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

enhancementNew feature or requestfeaturesql

Type

Feature

Projects

No projects

    Milestone

    • 26.5.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.