Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.17] Preconfigured Endpoints in Semantic_text field (#200659) #201192

Merged

Conversation

Samiul-TheSoccerFan
Copy link
Contributor

Backport

This will backport the following commits from main to 8.17:

Questions ?

Please refer to the Backport tool documentation

\n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n\n\nCo-authored-by: Samiul Monir <[email protected]>"}}]}] BACKPORT-->

## Summary

1. Removed default endpoints from the `Select inference id` dropdown
2. Linked preconfigured endpoints properly with fields.
3. Added support to remove `index` errors regarding models.

### ESS:

https://github.com/user-attachments/assets/4c13f5b3-a00a-4aac-a1c2-ca94e5b2c293

### ES3

https://github.com/user-attachments/assets/83f1bd74-0973-4225-907b-89e7c372fa5f

### ingest and data with the preconfigured endpoint:
```
POST /search-jmo0/_doc
{
    "content": "park_rocky-mountain"
}
```
```
GET /search-jmo0/_search
```

will return something like this:

```
{
  "took": 3,
  "timed_out": false,
  "_shards": {
    "total": 3,
    "successful": 3,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "search-jmo0",
        "_id": "712LRpMBqdKCj6yG9iFJ",
        "_score": 1,
        "_source": {
          "openai_semantic_text": {
            "inference": {
              "inference_id": "my-test-1-openai-endpoint",
              "model_settings": {
                "task_type": "text_embedding",
                "dimensions": 1536,
                "similarity": "dot_product",
                "element_type": "float"
              },
              "chunks": [
                {
                  "text": "park_rocky-mountain",
                  "embeddings": [...]
                }
              ]
            }
          },
          "elser_semantic_text": {
            "inference": {
              "inference_id": ".elser-2-elasticsearch",
              "model_settings": {
                "task_type": "sparse_embedding"
              },
              "chunks": [
                {
                  "text": "park_rocky-mountain",
                  "embeddings": {...}
                }
              ]
            }
          },
          "e5_semantic_text": {
            "inference": {
              "inference_id": ".multilingual-e5-small-elasticsearch",
              "model_settings": {
                "task_type": "text_embedding",
                "dimensions": 384,
                "similarity": "cosine",
                "element_type": "float"
              },
              "chunks": [
                {
                  "text": "park_rocky-mountain",
                  "embeddings": [...]
                }
              ]
            }
          },
          "content": "park_rocky-mountain"
        }
      }
    ]
  }
}
```

### Checklist

Check the PR satisfies following conditions.

Reviewers should verify this PR satisfies this list as well.

- [X] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit 052f527)
@Samiul-TheSoccerFan Samiul-TheSoccerFan merged commit 24b4c07 into elastic:8.17 Nov 21, 2024
20 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
enterpriseSearch 2.6MB 2.6MB +131.0B
indexManagement 697.4KB 697.4KB -17.0B
searchInferenceEndpoints 77.5KB 77.4KB -90.0B
total +24.0B

History

@Samiul-TheSoccerFan Samiul-TheSoccerFan deleted the backport/8.17/pr-200659 branch November 21, 2024 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants