Skip to content

Commit b8845d2

Browse files
[9.1] Adds new chunking strategies to the Inference integrations page (#2119)
### 📸 [Preview](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/2119/explore-analyze/elastic-inference/inference-api#chunking-strategies) This PR adds the new 'recursive' and 'none' chunking strategies to the Inference integrations page. ### Related issue: elastic/developer-docs-team#308 --------- Co-authored-by: florent-leborgne <[email protected]>
1 parent bd5b476 commit b8845d2

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

explore-analyze/elastic-inference/inference-api.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,20 @@ By default, documents are split into sentences and grouped in sections up to 250
9393

9494
### Chunking strategies
9595

96-
Two strategies are available for chunking: `sentence` and `word`.
96+
Several strategies are available for chunking:
9797

98-
The `sentence` strategy splits the input text at sentence boundaries. Each chunk contains one or more complete sentences ensuring that the integrity of sentence-level context is preserved, except when a sentence causes a chunk to exceed a word count of `max_chunk_size`, in which case it will be split across chunks. The `sentence_overlap` option defines the number of sentences from the previous chunk to include in the current chunk which is either `0` or `1`.
98+
`sentence`
99+
: The `sentence` strategy splits the input text at sentence boundaries. Each chunk contains one or more complete sentences ensuring that the integrity of sentence-level context is preserved, except when a sentence causes a chunk to exceed a word count of `max_chunk_size`, in which case it will be split across chunks. The `sentence_overlap` option defines the number of sentences from the previous chunk to include in the current chunk which is either `0` or `1`.
99100

100-
The `word` strategy splits the input text on individual words up to the `max_chunk_size` limit. The `overlap` option is the number of words from the previous chunk to include in the current chunk.
101+
`word`
102+
: The `word` strategy splits the input text on individual words up to the `max_chunk_size` limit. The `overlap` option is the number of words from the previous chunk to include in the current chunk.
103+
104+
`recursive`{applies_to}`stack: ga 9.1`
105+
: The `recursive` strategy splits the input text based on a configurable list of separator patterns (for example, newlines or Markdown headers). The chunker applies these separators in order, recursively splitting any chunk that exceeds the `max_chunk_size` word limit. If no separator produces a small enough chunk, the strategy falls back to sentence-level splitting.
106+
107+
`none` {applies_to}`stack: ga 9.1`
108+
109+
: The `none` strategy disables chunking and processes the entire input text as a single block, without any splitting or overlap. When using this strategy, you can instead [pre-chunk](https://www.elastic.co/docs/reference/elasticsearch/mapping-reference/semantic-text#auto-text-chunking) the input by providing an array of strings, where each element acts as a separate chunk to be sent directly to the inference service without further chunking.
101110

102111
The default chunking strategy is `sentence`.
103112

0 commit comments

Comments
 (0)