-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Closed
Copy link
Labels
:mlMachine learningMachine learning>bugFeature:GenAIFeatures around GenAIFeatures around GenAITeam:MLMeta label for the ML teamMeta label for the ML team
Description
Elasticsearch Version
8.17
Installed Plugins
No response
Java Version
bundled
OS Version
any
Problem Description
It is possible to create an inference endpoint with task_type == sparse_embedding but using the reranker model. The inference service should validate the model matches the task type by calling inference on the model before the endpoint is created.
Steps to Reproduce
# Create a sparse embedding endpoint with the reranker model
PUT _inference/sparse_embedding/oops
{
"service": "elasticsearch",
"service_settings": {
"num_allocations": 1,
"num_threads": 1,
"model_id": ".rerank-v1"
}
}
# Then try to use it
POST _inference/oops
{
"input": "but this is the reranker"
}
{
"error": {
"root_cause": [
{
"type": "status_exception",
"reason": "Trained model [.rerank-v1] is configured for task [text_similarity] but called with task [text_expansion]"
}
],
"type": "status_exception",
"reason": "Trained model [.rerank-v1] is configured for task [text_similarity] but called with task [text_expansion]"
},
"status": 403
}
Logs (if relevant)
No response
Metadata
Metadata
Assignees
Labels
:mlMachine learningMachine learning>bugFeature:GenAIFeatures around GenAIFeatures around GenAITeam:MLMeta label for the ML teamMeta label for the ML team