Skip to content

[8.19] Add none chunking strategy to disable automatic chunking for inference endpoints #129324

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

Merged
merged 7 commits into from
Jun 12, 2025

Conversation

jimczi
Copy link
Contributor

@jimczi jimczi commented Jun 12, 2025

Backport of #129150 to 8.19

…nce endpoints (elastic#129150)

This introduces a `none` chunking strategy that disables automatic chunking when using an inference endpoint.
It enables users to provide pre-chunked input directly to a `semantic_text` field without any additional splitting.

The chunking strategy can be configured either on the inference endpoint or directly in the `semantic_text` field definition.

**Example:**

```json
PUT test-index
{
  "mappings": {
    "properties": {
      "my_semantic_field": {
        "type": "semantic_text",
        "chunking_settings": {
          "strategy": "none"    <1>
        }
      }
    }
  }
}
```

<1> Disables automatic chunking on `my_semantic_field`.

```json
PUT test-index/_doc/1
{
    "my_semantic_field": ["my first chunk", "my second chunk", ...]    <1>
    ...
}
```

<1> Pre-chunked input provided as an array of strings.
Each array element represents a single chunk that will be sent directly to the inference service without further processing.
Copy link
Contributor

Documentation preview:

@jimczi jimczi added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Jun 12, 2025
@elasticsearchmachine elasticsearchmachine merged commit d7bcda3 into elastic:8.19 Jun 12, 2025
16 checks passed
@jimczi jimczi deleted the backport_129150_819 branch June 12, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >feature :ml Machine learning v8.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants