All Products
Search
Document Center

OpenSearch:Extended parameters

Last Updated:Mar 03, 2025

This topic describes the extended parameters of OpenSearch LLM-Based Conversational Search Edition.

Prompt parameters

attitude

Description: the tone of the answer. Default value: normal. Valid values:

  • normal

  • polite

  • patience

rule

Description: the level of detail of the answer. Default value: detailed. Valid values:

  • detailed: The answer is detailed and professional.

  • stepbystep: The answer is detailed and provides step-by-step instructions.

noanswer

Description: the response when the question cannot be answered. Default value: sorry. Valid values:

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

  • uncertain: I do not know.

language

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

  • Chinese

  • English

  • Thai

  • Korean

role

Description: the custom role that is used to answer the question. Example: AI assistant.

out_format

Description: the format in which to return the answer. Default value: text. Valid values:

  • text

  • table

  • list

  • markdown

Document retrieval parameters

filter

Description: the filter that is used to retrieve documents by field. By default, this parameter is left empty.

Syntax: 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.

sf

Description: the threshold for determining whether a retrieved document is relevant during vector-based retrieval. Default value: 1.3. A greater value specifies less relevance. Valid values: [0,+∞).

Syntax:

sf=value. Example: sf=1. You can change the value of the sf parameter based on your business requirements. A smaller value specifies greater relevance.

top_n

Description: the number of documents to be retrieved. Default value: 5. Valid values: (0,50].

Syntax:

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

formula

Description: the formula that is used to sort the retrieved documents.

Syntax:

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. Unit: seconds.

  2. timeliness_ms: returns the timeliness score that indicates how new a document is. Unit: 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.

operator

Description: the operator that is used to define the logical relationship between tokens used to retrieve documents. Default value: AND. Valid values: AND and OR.

Manual intervention parameters

sf

Description: the threshold for triggering manual intervention. Default value: 0.3. Valid values: [0,+∞). A greater value specifies that a manual intervention entry is more likely to be matched.

Syntax:

sf=value. Example: sf=1. You can change the value of the sf parameter based on your business requirements.

Reference image parameters

sf

Description: the threshold for determining the vector similarity between the reference image and the specified content. Default value: 1. Valid values: [0,+∞). A greater value specifies less vector similarity.

Syntax:

sf=value. Example: sf=1. You can change the value of the sf parameter based on your business requirements.

Other parameters

return_hits

Description: specifies whether to return the search results. Default value: false, which specifies that only reference links are returned.

Syntax:

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.

csi_level

Description: specifies whether to moderate the results that are generated by large language models (LLMs) for restricted content such as sensitive, political, or harmful content. Valid values:

  • none: does not moderate the results.

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

link

Description: specifies whether the reference source is included in the content generated by a model. Valid values:

  • true: The reference source is included in the content generated by a model.

  • false: The reference source is not included in the content generated by a model.

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 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^].
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.