All Products
Search
Document Center

OpenSearch:Q&A tests

Last Updated:Jan 02, 2024

After data is uploaded, you can start a Q&A test. The OpenSearch console provides the Q&A Test page for you to run Q&A tests. After you enter a question on this page, the large language model (LLM) generates a result for the question.

This topic describes how to run a Q&A test on the Q&A Test page in the OpenSearch console. To run a Q&A test, you need to only enter your question and then click Send.

Procedure

1. Log on to the OpenSearch console and switch to OpenSearch LLM-Based Conversational Search Edition in the upper-left corner. In the left-side navigation pane, click Instance Management. On the page that appears, find the instance in which you want to run a Q&A test and click Manage in the Actions column. On the details page of the instance, click Q&A Test in the left-side navigation pane.

image.png

image.png

Q&A parameters

Parameter

Type

Required

Valid value

Default value

Description

model

String

Yes

Qwen

The LLM used for this search. Valid values:

Qwen

opensearch_llama2_13b

opensearch_llama2_13b-beta

opensearch-falcon-70b

Multi-round Conversations

Boolean

No

false

false: disables the multi-round conversation feature.

true: enables the multi-round conversation feature. The system returns results based on the recent n rounds of conversations.

sessionId: the source of the conversation. The system returns results based on the context of the conversations with the same source.

2. Configure the Q&A parameters based on your search requirements, enter a question in the dialog box, and then click Send. You can also click Advanced Parameters to configure prompt parameters, document retrieval parameters, manual intervention parameters, reference image parameters, and other parameters.

image.png

Advanced parameters

Parameter

Type

Required

Valid value

Default value

Description

attitude

String

No

normal

The tone of the conversation. Default value: normal. Valid values:

normal

polite

patience

rule

String

No

simple

The level of detail in the conversation. Default value: detailed. Valid values:

detailed

stepbystep

noanswer

String

No

sorry

The information returned if the system fails to find an answer to the question. Default value: sorry. Valid values:

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

uncertain: I don't know.

language

String

No

Chinese

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

Chinese

English

Thai

Korean

role

Boolean

No

true

Specifies whether to enable a custom role to answer the question.

role_name

String

No

AI Assistant

The custom role. Example: AI Assistant.

out_format

String

No

table

The format of the answer. Default value: text. Valid values:

text

table

list

markdown

history_max

INT

No

The maximum number of rounds of conversations based on which the system returns results. You can specify 20 rounds at most.

filter

String

No

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

sf

Float

No

[0,+∞). The greater the value is, the less relevant the retrieved documents are.

Default value for text retrieval: 1.3.

Default value for intervention data retrieval: 0.3.

Default value for image retrieval: 1.0.

The threshold for determining whether a retrieved document is relevant during vector-based retrieval.

top_n

INT

No

(0, 50]

5

The number of documents to be retrieved.

formula

String

No

The formula that is used to sort the retrieved documents. By default, documents are retrieved based on vector similarity.

operator

String

No

AND

The operator between text tokens. Default value: AND.

return_hits

Boolean

No

false

Specifies whether to return the document retrieval results.

csi_level

String

No

none

The configurations for content moderation.

none: The content is not moderated.

loose: The content is moderated. If Content Moderation detects sensitive content, the content is blocked and no result is returned.

strict: The content is moderated. If Content Moderation detects sensitive content or content that may be sensitive, the content is blocked and no result is returned.

Note

3. The following figure shows an example of Q&A tests.

image.png