All Products
Search
Document Center

OpenSearch:Extended parameters

Last Updated:Apr 01, 2026

OpenSearch LLM-Based Conversational Search Edition supports extended parameters that control how the large language model (LLM) generates answers, how documents are retrieved and ranked, and how results are filtered and returned.

Prompt parameters

These parameters shape the tone, format, and language of LLM-generated answers.

attitude

The tone of the answer. Default value: normal. Valid values: normal, polite, patience.

rule

The level of detail in the answer. Default value: detailed.

ValueBehavior
detailed (default)Detailed and professional answer
stepbystepDetailed answer with step-by-step instructions

noanswer

The fallback response when the system cannot answer based on available information. Default value: sorry.

ValueResponse text
sorry (default)"Sorry, I cannot answer your question based on known information."
uncertain"I do not know."

language

The language of the generated answer. Default value: Chinese.

ValueLanguage
Chinese (default)Chinese
EnglishEnglish
ThaiThai
KoreanKorean

role

A custom persona for the answering agent. Example: AI assistant.

out_format

The format of the generated answer. Default value: text.

ValueOutput format
text (default)Plain text
tableTable
listList
markdownMarkdown

Document retrieval parameters

These parameters control which documents are retrieved and how they are ranked before the LLM generates an answer.

filter

Filters the document pool by field value before retrieval. By default, no filter is applied.

Syntax: field=value

Examples:

Match a single value:

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

Match one of two values using OR:

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

Match any value in a comma-separated list:

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

sf

The similarity threshold for vector-based retrieval. Documents with a score above this threshold are considered less relevant and may be excluded.

  • Default: 1.3

  • Valid values: [0, +∞)

  • Syntax: sf=value — for example, sf=1

A lower value requires higher similarity; a higher value allows more loosely related documents. Decrease sf to tighten relevance requirements, or increase it to retrieve a broader set of documents.

The sf parameter also appears under Manual intervention parameters and Reference image parameters, each with a different default value and semantic meaning. These are independent configurations.

top_n

The maximum number of documents to retrieve per query.

  • Default: 5

  • Valid values: (0, 50]

  • Syntax: top_n:value — for example, top_n:3

Increasing top_n gives the LLM more context for complex questions, but also increases response latency. Decrease it to speed up responses when fewer reference documents are sufficient.

formula

The scoring formula used to rank retrieved documents. Combine multiple functions using standard arithmetic operators.

Text relevance

FunctionDescription
text_relevanceCalculates text relevance between the search query and field values
field_match_ratioRatio of matched terms in a field to total terms in the field
query_match_ratioRatio of query terms matched in a field to total query terms
fieldterm_proximityProximity of matched terms within a field
field_lengthNumber of terms in a field
query_term_countNumber of terms in the search query after analysis
query_term_match_countNumber of query terms matched in a field
field_term_match_countNumber of field terms that match the search query
query_min_slide_windowRatio of matched query terms to the minimum window of those terms in the field

Timeliness

FunctionDescription
timelinessFreshness score for a document. Unit: seconds
timeliness_msFreshness score for a document. Unit: milliseconds

Functionality

FunctionDescription
tag_matchScores documents by matching query clauses against tags and computing tag weights
first_phase_scoreScore from the rough-sort (first-phase) expressions
kvpairs_valueValue of a specified field in a kvpairs clause of the query string
normalizeNormalizes scores from different value ranges to [0, 1]
in or notinChecks whether field values are in or not in a specified list

operator

The logical operator used to combine tokens during retrieval. Default value: AND.

ValueBehavior
AND (default)Retrieves only documents that contain all query tokens
ORRetrieves documents that contain any query token; increases recall at the cost of precision

Manual intervention parameters

sf

The similarity threshold for triggering a manual intervention entry. A higher value makes it easier for an entry to match.

  • Default: 0.3

  • Valid values: [0, +∞)

  • Syntax: sf=value — for example, sf=1

Reference image parameters

sf

The vector similarity threshold between a reference image and the specified content. A higher value allows less similar images to match.

  • Default: 1

  • Valid values: [0, +∞)

  • Syntax: sf=value — for example, sf=1

Other parameters

return_hits

Specifies whether to include search results in the response.

ValueBehavior
false (default)Returns only reference links
trueReturns the corresponding search results

Syntax: return_hits:value — for example, return_hits:true

csi_level

Enables content moderation on LLM-generated results. When moderation is triggered, no results are returned.

ValueBehavior
noneNo moderation applied
looseBlocks results if restricted content (sensitive, political, or harmful) is detected
strictBlocks results if restricted or suspicious content is detected — a stricter interpretation of the boundary than loose

link

Specifies whether the reference source is included in the LLM-generated answer. When set to true, citations appear as inline footnote markers ([^1^], [^2^], ...) where the number corresponds to the ordinal position of the referenced document in the returned results.

ValueBehavior
trueReference sources are embedded in the generated answer as footnote markers
falseReference sources are not included in the generated answer

Sample response with `link: 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 steps: 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 cannot reduce the capacity. We recommend that you implement reasonable capacity planning[^3^].

[^Number^] indicates the ordinal number of the retrieved document in the reference. For example, [^1^] refers to the first document.