All Products
Search
Document Center

OpenSearch:Custom parameters

Last Updated:Sep 19, 2026

This topic describes the custom parameters and syntax for OpenSearch LLM-Based Conversational Search Edition. The parameters are organized by function: Q&A parameters control the conversation model and session behavior, prompt parameters shape the response style and format, document retrieval parameters tune search quality, reference image parameters set image similarity thresholds, query understanding parameters enable query expansion, manual intervention parameters adjust entry matching, and other parameters configure content moderation and result output.

Q&A parameters

Parameter Type Required Default Description
Select Model String Yes opensearch-qwen The large language model (LLM) used for conversational search. For supported LLMs, see Manage LLMs.
Prompt String No Default prompt template The prompt template used for conversational search. For supported templates, see Manage prompts.
Multi-round Conversations Boolean No true Controls multi-turn conversation behavior. Valid values: false, true, session. See details below.
Streaming Output Boolean No true Specifies whether to stream results in real time. Valid values: false, true. See details below.

Multi-round Conversations values:

  • false: Disables multi-turn conversations. Each query is handled independently.

  • true: Enables multi-turn conversations. Results are based on the context of the previous N rounds.

  • session: Scopes conversation context to a source. Results are based on conversations with the same source identifier.

Streaming Output values:

  • false: Disables streaming output. Results are returned after the full response is generated.

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

Prompt parameters

Parameter Type Required Default Description
attitude String No normal The tone of the response. Valid values: normal, polite, patience.
rule String No simple The level of detail in the response. Valid values: detailed, stepbystep.
noanswer String No sorry The response returned when the system cannot answer the question. Valid values: sorry, uncertain.
language String No Chinese The language of the answer. Valid values: Chinese, English, Thai, Korean.
role Boolean No true Specifies whether a custom role answers the question.
role_name String No AI Assistant The name of the custom role. Example: AI Assistant.
out_format String No text The format of the answer. Valid values: text, table, list, markdown.

Document retrieval parameters

Parameters

Parameter Type Required Valid values Default Description
filter String No N/A None The field used to filter documents. Format: field=value.
top_n Int No (0, 50] 5 The number of documents to retrieve.
sf Float No [0, +∞) 1.3 The vector similarity threshold for document retrieval. See details below.
dense_weight Float No (0, 1) 0.7 The weight of the dense vector. Available only when a sparse vector model is selected. The sparse vector weight is 1 - dense_weight.
formula String No N/A Vector similarity The formula used to rank retrieved documents. See supported values below.
operator String No N/A AND The operator applied between text tokens during text retrieval.

sf threshold behavior:

  • Without sparse vector: valid range is [0, 2.0], default is 1.3. A smaller value leads to more relevant results, but the number of results may decrease.

  • With sparse vector enabled: default is 0.35. A larger value retrieves more relevant results, but the number of results may decrease.

Supported formula values:

Text relevance

Function Description
text_relevance Calculates text relevance between search queries and field values in documents.
field_match_ratio Returns the ratio of field terms matching the query to the total terms in the field.
query_match_ratio Returns the ratio of terms hit in a field to the total terms in the query.
fieldterm_proximity Returns the proximity of terms in a field.
field_length Returns the number of terms in a field.
query_term_count Returns the number of terms in the query after analysis.
query_term_match_count Returns the number of query terms matched in a field.
field_term_match_count Returns the number of field terms matching the query.
query_min_slide_window Returns the ratio of matched query terms to the minimum window of those terms in the field.

Timeliness

Function Description
timeliness Returns a timeliness score indicating document freshness, in seconds.
timeliness_ms Returns a timeliness score indicating document freshness, in milliseconds.

Functionality

Function Description
tag_match Matches query clauses with documents based on tags and calculates tag weights.
first_phase_score Returns the score calculated by rough sort expressions.
kvpairs_value Returns the value of a specified field in a kvpairs clause.
normalize Normalizes scores from different value ranges to [0, 1].
in or notin Checks whether field values are in or not in a specified list.

Syntax

filter

Format: field=value

Examples:

  1. Filter by a single value:

    "filter": "category=\"value1\""
  2. Filter by either of two values (OR condition):

    "filter": "category=\"value1\" OR category=\"value2\""
  3. Filter by any value in a list (separate values with commas):

    "filter": "category=\"value1,value2,value3,value4\""

top_n

Format: top_n:value

Example: top_n:3

sf

Format: sf=value

Example: sf=1.3

Reference image parameters

Parameters

Parameter Type Required Valid values Default Description
sf Float No [0, +∞) 1 The vector similarity threshold for reference images. For sparse vector models, a higher value indicates higher similarity. For dense vector models, a higher value indicates lower similarity.
dense_weight Float No (0, 1) 0.7 The weight of the dense vector. Available only when a sparse vector model is selected. The sparse vector weight is 1 - dense_weight.

Syntax

sf

Format: sf=value

Example: sf=1

Query understanding parameters

Parameter Type Required Valid values Default Description
query_extend Boolean No N/A false Specifies whether to enable query expansion. When enabled, queries are expanded to improve retrieval performance.
query_exten_num Int No (0, +∞) 5 The number of expanded queries to generate.

Manual intervention parameters

Parameters

Parameter Type Required Valid values Default Description
sf Float No [0, 2] 0.3 The threshold for matching manual intervention entries. A higher value makes it easier to match an intervention entry.

Syntax

sf

Format: sf=value

Example: sf=0.3

Other parameters

Parameters

Parameter Type Required Valid values Default Description
return_hits Boolean No N/A false Specifies whether to return search results. If set to false, only reference links are returned.
csi_level String No N/A strict The content moderation level. Valid values: none, loose, strict. See details below.
history_max Int No (0, 20] 20 The maximum number of conversation rounds used as context. Maximum: 20 rounds.
link Boolean No N/A false Specifies whether to return the source of each retrieved document.

csi_level values:

  • none: No content moderation is applied.

  • loose: Moderates results and blocks the response if restricted content is detected.

  • strict: Moderates results and blocks the response if restricted or suspicious content is detected.

Syntax

return_hits

Format: return_hits:value

Example: return_hits:true

link

When link is set to true, the response includes footnote-style source references. The notation [^N^] indicates the ordinal number of the retrieved document in the reference list. For example, [^1^] refers to the first document.

Sample response with link set 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 restarting the instance. If you use the offline resizing method, you must restart the instance[^1^]. To resize a disk, log on to the ECS console, find the disk, click Resize in the Actions column, and select a resizing method[^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 cannot reduce its capacity[^3^].