All Products
Search
Document Center

OpenSearch:Q&A-related parameters

Last Updated:Jul 04, 2025

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

-

opensearch-qwen

The large language model (LLM) used for a conversational search. For more information about supported LLMs, see Manage LLMs.

Prompt

String

No

-

Default prompt template

The prompt template used for the conversational search. For more information about supported prompt templates, see Manage prompts.

Multi-round Conversations

Boolean

No

-

true

  • false: disables the multi-round conversation feature.

  • true: enables the multi-round conversation feature. The system returns results based on the recent n rounds of conversations.

  • session: specifies the source of the conversation. The system returns results based on the context of the conversations with the same source.

Streaming Output

Boolean

No

-

true

  • false: disables the streaming output feature.

  • true: enables the streaming output feature. The system returns results in real time.

Prompt parameters

Parameters

Parameter

Type

Required

Valid value

Default value

Description

attitude

String

No

-

normal

  • The tone of the conversation. Default value: normal. Valid values:

  • normal

  • polite

  • patience

rule

String

No

-

detailed

The level of detail in the conversation. Default value: detailed. Valid values:

  • detailed

  • stepbystep

noanswer

String

No

-

sorry

The information returned if the system fails to find an answer to the question. Default value: sorry. Valid values:

  • sorry: Sorry, I cannot answer your question based on known information.

  • uncertain: I don't know.

language

String

No

-

Chinese

The language of the answer. Default value: Chinese. Valid values:

  • Chinese

  • English

  • Thai

  • Korean

role

Boolean

No

-

true

Specifies whether to enable a custom role to answer the question.

role_name

String

No

-

AI Assistant

The custom role. Example: AI Assistant.

out_format

String

No

-

text

The format of the answer. Default value: text. Valid values:

  • text

  • table

  • list

  • markdown

Document retrieval parameters

Parameters

Parameter

Type

Required

Valid value

Default value

Description

filter

String

No

-

-

The field 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 for determining the vector relevance for document retrieval.

  • If the sparse vector model is disabled, the parameter value ranges from 0 to 2.0 and the default value is 1.3. The smaller the value, the higher the document relevance but the fewer the retrieved documents. Conversely, less relevant documents may be retrieved.

  • If the sparse vector model is enabled, the default value is 0.35. The larger the value, the higher the document relevance but the fewer the retrieved documents. Conversely, less relevant documents may 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

-

Vector similarity

The formula based on which the retrieved documents are sorted.

operator

String

No

-

AND

The operator between text tokens during text retrieval.

Syntax

Parameter

Description

filter

Format of a filter condition: field=value.

Examples:

  1. Query data from the documents whose value of the category field is value1.

    "filter" : "category=\"value1\""

  2. Query data from the documents whose value of the category field is value1 or value2.

    "filter" : "category=\"value1\" OR category=\"value2\""

  3. Query data from the documents whose value of the category field is one of the specified values.

    Separate multiple values with commas (,).
    Example: category=value1,value2,value3,value4
    "filter" : "category=\"value1,value2,value3,value4\"" // Retrieve the documents whose value of the category field is one of the specified values.

top_n

top_n:value. Example: top_n:3. You can change the value of the top_n parameter based on your business requirements.

sf

sf=value. Example: sf = 1.3. If the sparse vector model is disabled, the parameter value ranges from 0 to 2.0 and the default value is 1.3. The smaller the value, the higher the document relevance but the fewer the retrieved documents. Conversely, less relevant documents may be retrieved. If the sparse vector model is enabled, the default value is 0.35. The larger the value, the higher the document relevance but the fewer the retrieved documents. Conversely, less relevant documents may be retrieved.

formula

  • Text relevance

  1. text_relevance: calculates the text relevance between search queries and field values in documents.

  2. field_match_ratio: returns the ratio of the number of terms in a field that match the search query to the total number of terms in the field.

  3. query_match_ratio: returns the ratio of the number of terms that are hit in a field to the total number of terms in the search query.

  4. fieldterm_proximity: returns the proximity of terms in a field.

  5. field_length: returns the number of terms in a field.

  6. query_term_count: returns the number of terms in the search query after analysis.

  7. query_term_match_count: returns the number of terms in the search query that are hit in a field in documents.

  8. field_term_match_count: returns the number of terms in a field that match the search query.

  9. query_min_slide_window: returns the ratio of the number of terms in the search query that are hit in a field to the minimum window of these terms in the field.

  • Timeliness

  1. timeliness: returns the timeliness score that indicates how new a document is in units of seconds.

  2. timeliness_ms: returns the timeliness score that indicates how new a document is in units of milliseconds.

  • Functionality

  1. tag_match: matches query clauses with documents based on tags and calculates the weights of matched tags to score the documents.

  2. first_phase_score: returns the score that is calculated by using rough sort expressions.

  3. kvpairs_value: returns the value of the specified field in a kvpairs clause in a query string.

  4. normalize: normalizes scores in different value ranges to numeric values in the range of [0,1].

  5. in or notin: checks whether field values are in or not in the specified list.

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

sf=value. Example: sf=1. You can change the value of the sf parameter based on your business requirements. Specify whether a sparse vector model is used.

Query understanding parameters

Parameters

Parameter

Type

Required

Valid value

Default value

Description

query_extend

Boolean

No

-

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

Parameters

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

sf=value. Example: sf=0.3. You can change the value of the sf parameter based on your business requirements. A greater value specifies that a manual intervention entry is more likely to be matched.

Other parameters

Parameters

Parameter

Type

Required

Valid value

Default value

Description

return_hits

Boolean

No

-

false

Specifies whether to return the search results. If you set this parameter to false, only reference links are returned.

csi_level

String

No

-

strict

The configurations for content moderation. Valid values:

  • none: does not moderate the content.

  • loose: moderates the results and blocks the results if restricted content is detected. In this case, no results are returned.

  • strict: moderates the results and blocks the results if restricted or suspicious content is detected. In this case, no results are returned.

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

-

false

Specifies whether to return the source of the retrieved document.

rich_text_strategy

String

No

-

The processing method of rich text. If this parameter does not exist or is left empty, rich text is not enabled, and the default processing method is used.

  • inside_response: The rich text tag in the answer is directly restored to the original text in the Markdown format. Note that a table is directly inserted into the Markdown file in the HTML format.

  • extend_response: The actual content of each rich text tag in the answer is returned by rich_text_ref. A picture is returned as a URL, a table is returned in the HTML format, and code is returned in the text format.

Syntax

Parameter

Description

return_hits

return_hits:value. Valid values: true and false. Example: return_hits:true. If you set the return_hits parameter to true, the corresponding search results are returned.

link

Sample response if you set this parameter to true:

You can resize the disk of an Elastic Compute Service (ECS) instance online or offline[^1^]. If you use the online resizing method, you can resize the disk without the need to restart the instance. If you use the offline resizing method, you must restart the instance[^1^]. To resize a disk, perform the following operations: Log on to the ECS console, find the disk that you want to resize, click Resize in the Actions column, and then select a resizing method based on your business requirements[^1^]. If you need to resize partitions and file systems, you can obtain relevant information by using the CLI or in the console[^2^]. After an ECS disk is resized, you can not reduce the capacity. We recommend that you implement reasonable capacity planning[^3^].

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.