Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions specification/inference/_types/CommonTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1306,6 +1306,24 @@ export class ElasticsearchServiceSettings {
* The maximum value is 32.
*/
num_threads: integer
/**
* Available only for the `rerank` task type using the Elastic reranker model.
* Controls the strategy used for processing long documents during inference.
*
* Possible values:
* - `truncate` (default): Processes only the beginning of each document.
* - `chunk`: Splits long documents into smaller parts (chunks) before inference.
*
* When `long_document_strategy` is set to `chunk`, Elasticsearch splits each document into smaller parts but still returns a single score per document.
* That score reflects the highest relevance score among all chunks.
*/
long_document_strategy?: string
/**
* Only for the `rerank` task type.
* Limits the number of chunks per document that are sent for inference when chunking is enabled.
* If not set, all chunks generated for the document are processed.
*/
max_chunks_per_doc?: integer
}

export class ElasticsearchTaskSettings {
Expand Down
4 changes: 3 additions & 1 deletion specification/inference/_types/Services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ import {
*/
export class InferenceEndpoint {
/**
* Chunking configuration object
* The chunking configuration object.
* Applies only to the `sparse_embedding` and `text_embedding` task types.
* Not applicable to the `rerank`, `completion`, or `chat_completion` task types.
*/
chunking_settings?: InferenceChunkingSettings
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ export interface Request extends RequestBase {
body: {
/**
* The chunking configuration object.
* Applies only to the `sparse_embedding` and `text_embedding` task types.
* Not applicable to the `rerank`, `completion`, or `chat_completion` task types.
* @ext_doc_id inference-chunking
*/
chunking_settings?: InferenceChunkingSettings
Expand Down