This topic describes the custom parameters of OpenSearch LLM-Based Conversational Search Edition and syntax.
Q&A parameters
Parameters | |||||
Parameter | Type | Required | Valid value | Default value | Description |
Select Model | String | Yes | N/A | opensearch-qwen | The large language model (LLM) used for this conversational search. For more information about the LLMs that are supported, see Manage LLMs. |
Prompt | String | No | N/A | Default prompt template | The prompt template that is used for this conversational search. For more information about the prompt templates that are supported, see Manage prompts. |
Multi-round Conversations | Boolean | No | N/A | true |
|
Streaming Output | Boolean | No | N/A | true |
|
Prompt parameters
Parameters | |||||
Parameter | Type | Required | Valid value | Default value | Description |
attitude | String | No | N/A | normal |
|
rule | String | No | N/A | simple | The level of detail in the conversation. Default value: detailed. Valid values:
|
noanswer | String | No | N/A | sorry | The information that is returned if the system fails to provide an answer to the question. Default value: sorry. Valid values:
|
language | String | No | N/A | Chinese | The language of the answer. Default value: Chinese. Valid values:
|
role | Boolean | No | N/A | true | Specifies whether to enable a custom role to answer the question. |
role_name | String | No | N/A | AI Assistant | The custom role. Example: AI Assistant. |
out_format | String | No | N/A | text | The format of the answer. Default value: text. Valid values:
|
Document retrieval parameters
Parameters | |||||
Parameter | Type | Required | Valid value | Default value | Description |
filter | String | No | N/A | None | The field that is used to filter documents. Example: filter = field = value. |
top_n | Int | No | (0,50] | 5 | The number of documents to be retrieved. |
sf | Float | No | [0,+∞) | 1.3 | The threshold that is used to determine the vector similarity of the documents to be retrieved.
|
dense_weight | Float | (0,1) | 0.7 | The weight of the dense vector. This parameter is available if you select a sparse vector model. Valid values: (0,1). The weight of the sparse vector is calculated in the following way: 1 - Value of the dense_weight parameter. | |
formula | String | No | N/A | Vector similarity | The formula based on which the retrieved documents are sorted. |
operator | String | No | N/A | AND | The operator between text tokens during text retrieval. |
Syntax | |
Parameter | Description |
filter | Format of a filter condition: field=value. Examples
|
top_n |
|
sf |
|
formula |
|
Reference image parameters
Parameters | |||||
Parameter | Type | Required | Valid value | Default value | Description |
sf | Float | No | [0,+∞) | 1 | The threshold for determining the vector similarity of reference images. For sparse vector models, a greater value indicates a greater vector similarity. For dense vector models, a greater value indicates a smaller vector similarity. |
dense_weight | Float | No | (0,1) | 0.7 | The weight of the dense vector. This parameter is available if you select a sparse vector model. Valid values: (0,1). The weight of the sparse vector is calculated in the following way: 1 - Value of the dense_weight parameter. |
Syntax | |
Parameter | Description |
sf |
|
Query understanding parameters
Parameters | |||||
Parameter | Type | Required | Valid value | Default value | Description |
query_extend | Boolean | No | N/A | false | Specifies whether to extend queries. After this feature is enabled, queries are extended to improve the retrieval performance. |
query_exten_num | Int | No | (0, +∞) | 5 | The number of queries to be extended. |
Manual intervention parameter
Parameter | |||||
Parameter | Type | Required | Valid value | Default value | Description |
sf | Float | No | [0,2] | 0.3 | The threshold for manual intervention. Default value: 0.3. A greater value indicates a match of intervention entries in an easier way. |
Syntax | |
Parameter | Description |
sf |
|
Other parameters
Parameters | |||||
Parameter | Type | Required | Valid value | Default value | Description |
return_hits | Boolean | No | N/A | false | Specifies whether to return the search results. If you set this parameter to false, only reference links are returned. |
csi_level | String | No | N/A | strict | The configurations for content moderation. Valid values:
|
history_max | INT | No | (0,20] | 20 | The maximum number of rounds of conversations based on which the system returns results. You can specify up to 20 rounds. |
link | Boolean | No | N/A | false | Specifies whether to return the source of the retrieved document. |
Syntax | |
Parameter | Description |
return_hits |
|
link | Sample response if you set this parameter to true:
Note [^Number^] indicates the ordinal number of the retrieved document in the reference of the returned results. For example, [^1^] indicates the first document in the reference. |