This topic describes the custom parameters and their syntax for OpenSearch LLM-Based Conversational Search Edition.
Q&A parameters
Parameters | |||||
Parameter | Type | Required | Valid values | Default value | Description |
Model selection | String | Yes | - | opensearch-qwen | The large language model (LLM) used for the search. For information about the available models, see Manage LLMs. |
Prompt | String | No | - | Default system template | The prompt used for the search. For information about the available prompts, see Prompt management |
Multi-round conversation | Boolean | No | - | true |
|
Streaming output | Boolean | No | - | true |
|
Prompt parameters
Parameters | |||||
Parameter | Type | Required | Valid values | Default value | Description |
attitude | String | No | - | normal |
|
rule | String | No | - | detailed | The level of detail of the conversation. Default value: detailed.
|
noanswer | String | No | - | sorry | The reply returned when a question cannot be answered. Default value: sorry.
|
language | String | No | - | Chinese | The language used to answer questions. Default value: Chinese.
|
role | Boolean | No | - | true | If enabled, the role used for answers is customized. |
role_name | String | No | - | AI Assistant | The customized role used for answers. Example: AI Assistant. |
out_format | String | No | - | text | The format of the output content. Default value: text.
|
Document retrieval parameters
Parameters | |||||
Parameter | Type | Required | Valid values | Default value | Description |
filter | String | No | - | - | Filters documents based on the target field during retrieval. Example: filter = field = value |
top_n | Int | No | (0, 50] | 5 | The number of documents to retrieve. |
sf | Float | No | [0,+∞) | 1.3 | The threshold of the vector score for vector-based retrieval.
|
dense_weight | Float | (0,1) | 0.7 | Optional when a sparse vector model is selected. The weight of dense vectors. The value is a floating-point number in the range of (0,1). The weight of sparse vectors is 1 - dense_weight. | |
formula | String | No | - | Vector similarity | The sort expression for document retrieval. |
operator | String | No | - | AND | The relationship between text tokens during text-based retrieval. |
Syntax | |
Parameter | Syntax |
filter | Filter condition format: field=value Examples:
|
top_n | |
sf | |
formula |
|
Reference image parameters
Parameters | |||||
Parameter | Type | Required | Valid values | Default value | Description |
sf | Float | No | [0,+∞) | 1 | The threshold for reference images. For sparse vector models, a larger sf value indicates a higher vector similarity between the reference images and the content. For dense vector models, a larger sf value indicates a lower vector similarity between the reference images and the content. |
dense_weight | Float | No | (0,1) | 0.7 | Optional when a sparse vector model is selected. The weight of dense vectors. The value is a floating-point number in the range of (0,1). The weight of sparse vectors is 1 - dense_weight. |
Syntax | |
Parameter | Syntax |
sf | |
Query understanding parameters
Parameters | |||||
Parameter | Type | Required | Valid values | Default value | Description |
query_extend | Boolean | No | - | false | If enabled, queries are expanded to improve retrieval quality. |
query_exten_num | Int | No | (0,+∞) | 5 | The number of expanded queries. |
Manual intervention parameters
Manual intervention parameters | |||||
Parameter | Type | Required | Valid values | Default value | Description |
sf | Float | No | [0,2] | 0.3 | The threshold for manual intervention questions. Default value: 0.3. A larger sf value makes it easier to match manual intervention entries. |
Syntax | |
Parameter | Syntax |
sf | |
Other parameters
Other parameters | |||||
Parameter | Type | Required | Valid values | Default value | Description |
return_hits | Boolean | No | - | false | Specifies whether to return the document retrieval results in the response. If the results are not returned, only reference links are returned. |
csi_level | String | No | - | strict | Content Moderation configuration
|
history_max | INT | No | (0,20] | 20 | The maximum number of history rounds for multi-round conversations. Maximum value: 20. |
link | Boolean | No | - | false | Specifies whether to return the specific sources of the retrieved documents in the response. |
rich_text_strategy | String | No | - | The post-processing method for rich-text LLM output (if this configuration does not exist or is empty, rich text is disabled, which is the default behavior):
| |
Syntax | |
Parameter | Syntax |
return_hits | |
link | The following example shows a response that contains content: Note A number enclosed in '[^' and '^]' indicates the position of the document in reference in the returned results. For example, '[^1^]' refers to the first document in reference. |