Skip to content

Commit b3d76e0

Browse files
committed
Standardized headings to bold, clarified and expanded timeout instructions by deployment type, improved formatting, and added an external API doc link at the end.
1 parent 6d3047c commit b3d76e0

File tree

1 file changed

+20
-15
lines changed
  • docs/reference/query-languages/esql/_snippets/commands/layout

1 file changed

+20
-15
lines changed

docs/reference/query-languages/esql/_snippets/commands/layout/completion.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ stack: preview 9.1.0
77
88
The `COMPLETION` command allows you to send prompts and context to a Large Language Model (LLM) directly within your ES|QL queries, to perform text generation tasks.
99

10-
### Syntax
10+
**Syntax**
1111

1212
```esql
1313
COMPLETION [column =] prompt WITH inference_id
1414
```
1515

16-
### Parameters
16+
**Parameters**
1717

1818
`column`
1919
: (Optional) The name of the output column containing the LLM's response.
@@ -28,7 +28,7 @@ COMPLETION [column =] prompt WITH inference_id
2828
: The ID of the [inference endpoint](docs-content://explore-analyze/elastic-inference/inference-api.md) to use for the task.
2929
The inference endpoint must be configured with the `completion` task type.
3030

31-
### Description
31+
**Description**
3232

3333
The `COMPLETION` command provides a general-purpose interface for
3434
text generation tasks using a Large Language Model (LLM) in ES|QL.
@@ -43,39 +43,44 @@ including:
4343
- Content rewriting
4444
- Creative generation
4545

46-
### Requirements
46+
**Requirements**
4747

4848
To use this command, you must deploy your LLM model in Elasticsearch as
4949
an [inference endpoint](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put) with the
5050
task type `completion`.
5151

5252
#### Handling timeouts
5353

54-
`COMPLETION` commands may time out when processing large datasets or complex prompts. To increase timeout limits for these operations, the configuration methods vary by deployment type:
54+
`COMPLETION` commands may time out when processing large datasets or complex prompts. The default timeout is 10 minutes, but you can increase this limit if necessary.
55+
56+
How you increase the timeout depends on your deployment type:
5557

5658
::::{tab-set}
57-
:::{tab-item} {{ess}}
58-
* Timeouts can be increased through {{es}} settings in the [Elastic Cloud Console](docs-content://deploy-manage/deploy/elastic-cloud/edit-stack-settings.md)
59-
* Adjust the `search.default_search_timeout` cluster setting
59+
:::{tab-item} {{ech}}
60+
* You can adjust {{es}} settings in the [Elastic Cloud Console](docs-content://deploy-manage/deploy/elastic-cloud/edit-stack-settings.md)
61+
* You can also adjust the `search.default_search_timeout` cluster setting using [Kibana's Advanced settings](kibana://reference/advanced-settings.md#kibana-search-settings)
62+
* The default timeout is 10 minutes
6063
:::
6164

6265
:::{tab-item} Self-managed
63-
* Configure at the cluster level:
64-
* Set `search.default_search_timeout` in `elasticsearch.yml`
65-
* Or update via Cluster Settings API
66-
* Alternatively, add timeout parameters to individual queries
66+
* You can configure at the cluster level by setting `search.default_search_timeout` in `elasticsearch.yml` or updating via [Cluster Settings API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings)
67+
* You can also adjust the `search:timeout` setting using [Kibana's Advanced settings](kibana://reference/advanced-settings.md#kibana-search-settings)
68+
* Alternatively, you can add timeout parameters to individual queries
69+
* The default timeout is 10 minutes
6770
:::
6871

6972
:::{tab-item} {{serverless-full}}
70-
Requires a manual override from Elastic Support as users cannot modify timeout settings directly.
73+
* The default timeout is 10 minutes
74+
* Requires a manual override from Elastic Support because you cannot modify timeout settings directly
7175
:::
7276
::::
7377

74-
**Alternative workarounds:**
78+
If you don't want to increase the timeout limit, try the following:
7579

7680
* Reduce data volume with `LIMIT` or more selective filters before the `COMPLETION` command
7781
* Split complex operations into multiple simpler queries
78-
* Configure your HTTP client's response timeout (Refer to [HTTP client configuration](/reference/elasticsearch/configuration-reference/networking-settings.md#_http_client_configuration)
82+
* Configure your HTTP client's response timeout (Refer to [HTTP client configuration](/reference/elasticsearch/configuration-reference/networking-settings.md#_http_client_configuration))
83+
7984

8085
**Examples**
8186

0 commit comments

Comments
 (0)