Skip to content

SQL vector scoring functions (vectorRRFScore, multiVectorScore, vectorHybridScore): adopt FunctionOptions #3883

Description

@lvca

Motivation

Follow-up to #3881 and #3882. The vector scoring functions each have fragile positional overloads:

  • vectorRRFScore(rank1, rank2, ... [, k]) - ambiguity: a trailing Number >= 60 is treated as k, otherwise as a rank list. Adding weights or normalize later would multiply the ambiguity.
  • multiVectorScore(scores, method [, weights]) - the weights slot is only valid when method == "WEIGHTED".
  • vectorHybridScore(vec, kw, alpha) - no options today, but foreseeable normalize, method, kwMax, vecMax.

Proposal

Accept a trailing options map validated by FunctionOptions on each function. Legacy positional forms remain supported. Unknown keys are rejected.

Deliverables

  • Code: route trailing options through FunctionOptions.
  • Tests: options-map path + unknown-key rejection.
  • Docs: show options-map syntax alongside the positional form.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Fields

No fields configured for Feature.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions