All Products
Search
Document Center

OpenSearch:Q&A-related parameters

Last Updated:Jun 08, 2026

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

  • false: Disables multi-round conversations.

  • true: Enables multi-round conversations. Results are based on the recent n rounds.

  • session: Returns results based on conversations with the same session source.

Streaming Output

Boolean

No

-

true

  • false: Disables streaming output.

  • true: Enables streaming output. Results are returned in real time.

Prompt parameters

Parameters

Parameter

Type

Required

Valid value

Default value

Description

attitude

String

No

-

normal

  • The conversation tone. Valid values:

  • normal

  • polite

  • patience

rule

String

No

-

detailed

The response detail level. Valid values:

  • detailed

  • stepbystep

noanswer

String

No

-

sorry

The fallback response when no answer is found. Valid values:

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

  • uncertain: I don't know.

language

String

No

-

Chinese

The response language. Valid values:

  • Chinese

  • English

  • Thai

  • Korean

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:

  • text

  • table

  • list

  • markdown

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.

  • If the sparse vector model is disabled, valid range is 0 to 2.0 (default: 1.3). A smaller value yields higher relevance but fewer results.

  • If the sparse vector model is enabled, the default is 0.35. A larger value yields higher relevance but fewer results.

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:

  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 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

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

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

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

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:

  • none: No content moderation.

  • loose: Blocks results if restricted content is detected.

  • strict: Blocks results if restricted or suspicious content is detected.

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.

  • inside_response: Rich text tags in the answer are restored to Markdown format. Tables are inserted as HTML.

  • extend_response: Rich text content is returned separately via rich_text_ref. Images are returned as URLs, tables as HTML, and code as plain text.

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.