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 don't 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 questions. 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.
Example:
1. Specify the filter parameter in the following format if you want to query data only from the document whose category is value1:
"filter" : "category=\"value1\""
2. Specify the filter parameter in the following format if you want to query data only from the document whose category is value1 or value2:
"filter" : "category=\"value1\" OR category=\"value2\""
sf
Description: the threshold for determining whether a retrieved document is relevant during vector-based retrieval. Default value: 1.3. A larger 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
text_relevance: calculates the text relevance between search queries and field values in documents.
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.
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.
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 search query after analysis.
query_term_match_count: returns the number of terms in the search query that are hit in a field in documents.
field_term_match_count: returns the number of terms in a field that match the search query.
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
timeliness: returns the timeliness score that indicates how new a document is. Unit: seconds.
timeliness_ms: returns the timeliness score that indicates how new a document is. Unit: millisecond.
Functionality
tag_match: matches query clauses with documents based on tags and calculates the weights of matched tags to score the documents.
first_phase_score: returns the score that is calculated by using rough sort expressions.
kvpairs_value: returns the value of the specified field in a kvpairs clause in a query string.
normalize: normalizes scores in different value ranges to numeric values in the range of [0,1].
in or notin: checks whether field values are in or not in the specified list.
Manual intervention parameters
sf
Description: the threshold for triggering manual intervention. Default value: 0.3. Valid values: [0,+∞). A larger 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 larger 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.