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.
Motivation
Follow-up to #3881 and #3882. The vector scoring functions each have fragile positional overloads:
vectorRRFScore(rank1, rank2, ... [, k])- ambiguity: a trailingNumber >= 60is treated ask, otherwise as a rank list. Addingweightsornormalizelater would multiply the ambiguity.multiVectorScore(scores, method [, weights])- theweightsslot is only valid whenmethod == "WEIGHTED".vectorHybridScore(vec, kw, alpha)- no options today, but foreseeablenormalize,method,kwMax,vecMax.Proposal
Accept a trailing options map validated by
FunctionOptionson each function. Legacy positional forms remain supported. Unknown keys are rejected.Deliverables
FunctionOptions.