All Products
Search
Document Center

OpenSearch:Implement table-based conversational search

Last Updated:Apr 01, 2026

Table-based conversational search lets you run natural-language queries against structured data in tables. After you define a simple table schema, your end users can ask questions like:

  • "Which product had the highest sales in Q3?"

  • "Show me all orders placed between January and March with a value greater than $500."

  • "What is the return rate for product SKU-1023?"

OpenSearch LLM-Based Conversational Search Edition maps these natural-language queries to the underlying table, retrieves matching rows or computed answers, and returns a structured response — without requiring you to write SQL.

How it works

  1. Create a secondary table in your OpenSearch instance and define the field schema.

  2. Load data into the secondary table — by importing a file or syncing from a MaxCompute data source.

  3. Run a conversational search test to verify results.

During a search, OpenSearch queries the secondary table first. If Text Q&A is enabled and no answer is found in the table, the search falls back to the field tagged as Content, which increases the overall response rate. Note that a field with the Content tag is synchronized to the main table.

Prerequisites

Before you begin, make sure you have:

  • An OpenSearch LLM-Based Conversational Search Edition instance

  • (For MaxCompute sync) An AccessKey ID and AccessKey Secret for the account that owns the MaxCompute project. To create one, see Create an AccessKey pair

Limitations

  • Each instance supports up to 5 secondary tables.

  • Each secondary table supports up to 30 fields for writes and queries.

Field schema constraints

Review these constraints before configuring your table schema:

Field propertyConstraint
Table nameLetters, digits, and underscores (_); 1–20 characters
Field nameMust start with a letter; letters, digits, and underscores (_); up to 30 characters
Field descriptionUp to 30 characters; strongly affects search quality — specify a description for every field
Primary key typeINT or TEXT; each value must be unique
Field typeMust match the type in the source table; mismatched types cause upload failure
Content tagField must be TEXT type; only one field per secondary table can carry this tag; synchronized to the main table
Field tag (Text Q&A off)Not required
Field tag (Text Q&A on)Must be set to Content or Primary Key

Choose a setup method

MethodBest for
Manually create a secondary tableSmall datasets, one-time uploads, or when no persistent data source exists
Create a secondary table via a data sourceOngoing sync from MaxCompute; the table schema is derived directly from the MaxCompute table

Method 1: Manually create a secondary table

Create the secondary table

  1. Go to the Instance Management page, find your instance, and click Manage in the Actions column.

  2. In the left-side navigation pane, choose Configuration Center > Data Configuration, then click Change Configurations.

  3. In the Data Processing Configuration step, keep the default settings and click Next to reach the Data Structure step.

  4. Click Add Table and select Manually Create.

    手动创建.png

  5. Define your fields. To enable text-based fallback search on a specific field, turn on Text Q&A and assign the Content tag to that field.

    image.png

  6. Click Completed and wait for the secondary table to be created.

Load data

Choose one of the following methods:

Option A: import a file

Click Import File. Review the sample data format before importing.

文件导入.png
To upload data programmatically, use the API instead. See Push documents.

Option B: sync from MaxCompute

  1. Click Add Data Source and select MaxCompute.

  2. Click Connect to Database. In the dialog box, enter the Project Name, AccessKey ID, and AccessKey Secret, then click Connect.

    To reduce the threat of disclosure, the AccessKey Secret is displayed only once upon creation and cannot be retrieved. Store it securely before proceeding.

    image.png

    image.png

  3. Select the MaxCompute table to use and click OK.

    image.png

  4. Map MaxCompute fields to the fields in your secondary table, then click OK.

    image.png

  5. Specify partition filters if needed, then click Completed. If no filters are specified, data is pulled from all partitions.

    image.png

Method 2: Create a secondary table via a data source

Use this method when your structured data already lives in MaxCompute and you want the field schema derived automatically.

  1. Go to the Instance Management page, find your instance, and click Manage in the Actions column.

  2. In the left-side navigation pane, choose Configuration Center > Data Configuration, then click Change Configurations.

  3. In the Data Processing Configuration step, keep the default settings and click Next to reach the Data Structure step.

  4. Click Add Table and select Use Data Source.

  5. In the Select Data Source panel, click MaxCompute, then click Connect to Database. Enter the Project Name, AccessKey ID, and AccessKey Secret, then click Connect.

    image.png

  6. Select the MaxCompute table to use and click OK.

    image.png

  7. To enable text-based fallback search on a specific field, turn on Text Q&A and assign the Content and Primary Key tags to the appropriate fields.

    For details on other field tag options, see Import data.

    image.png

  8. Specify partition filters if needed, then click Completed. If no filters are specified, data is pulled from all partitions. Wait for the MaxCompute data source to connect and the secondary table to be created.

Test the configuration

After data is loaded, run a conversational search test to verify results.

  1. Go to the Perform a Q&A test page and enter a natural-language question based on your table data.

  2. Check the response. A correct response returns a structured answer drawn from the secondary table. If Text Q&A is enabled and no table match is found, the response falls back to the Content-tagged field.

  3. To see the total number of documents indexed, go to Data Configuration and check the Data Query section.

    image.png

To query data programmatically, see Q&A document query.

Next steps

  • Tune field descriptions to improve search accuracy — clear, specific descriptions produce better results.

  • To update data, re-import the file or add the MaxCompute data source again to sync data.

  • To add more tables, repeat the steps above. Each instance supports up to 5 secondary tables.