elastic / elasticsearch

Free and Open, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
69.48k stars 24.6k forks source link

[Retrievers] Rerank retriever doesn't notify of / error on non-existant inference_id #111934

Closed maxhniebergall closed 2 weeks ago

maxhniebergall commented 3 weeks ago

Elasticsearch Version

serverless

Installed Plugins

No response

Java Version

bundled

OS Version

n/a

Problem Description

when performing semantic search with reranking retriever, the retriever doesn't throw an error if the inference_id doesn't exist

client.search(
        index="characters-index",
        retriever={
            "text_similarity_reranker": {
                "retriever": {
                    "standard": {
                        "query": {"semantic": {"field": "infer_field", "query": "robinson"}}
                    }
                },
                "field": "titles",
                "inference_id": "fake_inference_endpoint",
                "inference_text": "robinson",
                "rank_window_size": 100,
            }
        },
    )

Steps to Reproduce

perform a search on an index using reranking retriever with a non-existant inference endpoint

client.search(
        index="characters-index",
        retriever={
            "text_similarity_reranker": {
                "retriever": {
                    "standard": {
                        "query": {"semantic": {"field": "infer_field", "query": "robinson"}}
                    }
                },
                "field": "titles",
                "inference_id": "coherzfe_rerank",
                "inference_text": "robinson",
                "rank_window_size": 100,
            }
        },
    )

should return an error but no results are returned instead.

Logs (if relevant)

No response

elasticsearchmachine commented 3 weeks ago

Pinging @elastic/ml-core (Team:ML)

elasticsearchmachine commented 3 weeks ago

Pinging @elastic/es-search-relevance (Team:Search Relevance)

maxhniebergall commented 3 weeks ago

@Mikep86, do you know who should investigate this issue?

maxhniebergall commented 3 weeks ago

It also doesn't produce an error (just no results) when the field name is wrong (non-existant).

Mikep86 commented 3 weeks ago

@maxhniebergall I think this issue belongs to the search relevance team. I added it to the semantic reranking backlog. Thank you for reporting it!