Skip to content

Request to use rescore with retriever for ES Query DSL #118327

@bobby-ohouse

Description

@bobby-ohouse

Description

First, I'm grateful for your work and SW and look forward to your new design of "retrievers".

However, currently, Elasticsearch does not support using rescore in conjunction with retrieve API.
Even, a standard retriever, which has 'query', does not support rescore.
That means, unfortunately, I realized if I'm not missing something, there is no way to migrate the previous Query DSL having rescored into the new design

Adding this rescore capability is required to enhance the flexibility and precision of search workflows significantly in our examples.
Rescoring is a powerful tool to refine the ranking of top-k results after an initial retrieval query, and enabling this combination could address numerous real-world use cases, such as personalized ranking and boosting relevance based on secondary scoring logic.

Feature Request

I propose enhancing Elasticsearch to allow rescore operations to be integrated seamlessly with retrieval queries. Specifically, the feature should support:

{
"retriever": {...},
"rescore": [{...}],
}

Hybrid Rescoring: Allowing rescoring over retrieval results generated by a combination of text-based queries, vector searches, or other retrieval methods.
Customizable Pipelines: Defining custom rescoring logic (e.g., script-based, machine learning model inference) post-retrieval.

Expected Use Cases

Personalized Recommendations: Use retrieval for candidate selection and rescore using user-specific preferences or behavior data.
Semantic Search: Enhance the ranking of results retrieved through semantic or vector-based search with additional scoring layers.
E-commerce Applications: Rank products based on business-specific signals such as user reviews, sales data, or clickstream analysis.
Benefits
Improved Search Quality: Enable more precise ranking mechanisms to surface the most relevant results.
Flexibility: Combine multiple ranking signals for complex search scenarios.
Efficiency: Optimize workflows by allowing rescoring to target the top-k results instead of recalculating scores for the entire result set.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions