Skip to content

[Question]: How can I get the original distances / scores if I use reranker? #2907

@hidoba

Description

@hidoba

Describe your problem

I do reranking of 3 searches. Can I get the original distances of each of the 3 searches?
This doesn't work:

result, extra_result = (
    table_instance.output([
        "chunk_id", 
        "title", 
        "content", 
        "file_path",
        "_distance",
        "_score",
        "_similarity",
    ])
    .match_dense("embeddings", dense_embedding, "float", "l2", top_k*3)
    .match_sparse("sparse_embedding", sparse_vector, "ip", top_k*3)
    .match_text("content", query, top_k*3)
    .fusion(method="rrf", topn=top_k)
    .to_pl()
)

(3013, 'DISTANCE() / DISTANCE_FACTORS() needs to be allowed only when there is only MATCH VECTOR with distance metrics,

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions