Custom parameters and syntax for OpenSearch LLM-Based Conversational Search Edition.
Q&A parameters
|
Parameters |
|||||
|
Parameter |
Type |
Required |
Valid value |
Default value |
Description |
|
Select Model |
String |
Yes |
- |
opensearch-qwen |
The LLM used for the search. For more information about supported LLMs, see Manage LLMs. |
|
Prompt |
String |
No |
- |
Default prompt template |
The prompt template for the search. For more information about supported prompt templates, see Manage prompts. |
|
Multi-round Conversations |
Boolean |
No |
- |
true |
|
|
Streaming Output |
Boolean |
No |
- |
true |
|
Prompt parameters
|
Parameters |
|||||
|
Parameter |
Type |
Required |
Valid value |
Default value |
Description |
|
attitude |
String |
No |
- |
normal |
|
|
rule |
String |
No |
- |
detailed |
The response detail level. Valid values:
|
|
noanswer |
String |
No |
- |
sorry |
The fallback response when no answer is found. Valid values:
|
|
language |
String |
No |
- |
Chinese |
The response language. Valid values:
|
|
role |
Boolean |
No |
- |
true |
Whether to use a custom role for responses. |
|
role_name |
String |
No |
- |
AI Assistant |
The custom role name. Example: AI Assistant. |
|
out_format |
String |
No |
- |
text |
The response format. Valid values:
|
Document retrieval parameters
|
Parameters |
|||||
|
Parameter |
Type |
Required |
Valid value |
Default value |
Description |
|
filter |
String |
No |
- |
- |
The filter field for document 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 vector relevance threshold for document retrieval.
|
|
dense_weight |
Float |
(0,1) |
0.7 |
The dense vector weight. Available when a sparse vector model is selected. Sparse vector weight = 1 - dense_weight. |
|
|
formula |
String |
No |
- |
Vector similarity |
The sorting formula for retrieved documents. |
|
operator |
String |
No |
- |
AND |
The operator between text tokens during 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 vector similarity threshold for reference images. For sparse vector models, a greater value indicates higher similarity. For dense vector models, a greater value indicates lower similarity. |
|
dense_weight |
Float |
No |
(0,1) |
0.7 |
The dense vector weight. Available when a sparse vector model is selected. Sparse vector weight = 1 - dense_weight. |
|
Syntax |
|
|
Parameter |
Description |
|
sf |
|
Query understanding parameters
|
Parameters |
|||||
|
Parameter |
Type |
Required |
Valid value |
Default value |
Description |
|
query_extend |
Boolean |
No |
- |
false |
Whether to extend queries. When enabled, queries are expanded to improve retrieval performance. |
|
query_exten_num |
Int |
No |
(0,+∞) |
5 |
The number of queries to extend. |
Manual intervention parameter
|
Parameters |
|||||
|
Parameter |
Type |
Required |
Valid value |
Default value |
Description |
|
sf |
Float |
No |
[0,2] |
0.3 |
The manual intervention threshold. A greater value makes intervention entries easier to match. |
|
Syntax |
|
|
Parameter |
Description |
|
sf |
|
Other parameters
|
Parameters |
|||||
|
Parameter |
Type |
Required |
Valid value |
Default value |
Description |
|
return_hits |
Boolean |
No |
- |
false |
Whether to return search results. If set to false, only reference links are returned. |
|
csi_level |
String |
No |
- |
strict |
The content moderation level. Valid values:
|
|
history_max |
INT |
No |
(0,20] |
20 |
The maximum conversation rounds used for context. Up to 20 rounds. |
|
link |
Boolean |
No |
- |
false |
Whether to return the source of the retrieved document. |
|
rich_text_strategy |
String |
No |
- |
The rich text processing method. If empty or not set, rich text is disabled and the default method is used.
|
|
|
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. |