Prepare a Query Set

Query sets are CSV files containing the queries you want the job to process, any filters you want to use, and the configuration for displaying the results. See an example query set and learn how to create your own.

Query Set Format

Make sure your query set CSV contains the following columns:

Column NameContentRequired?
queryThe actual query text.Yes
filtersThe filters used to narrow down the files processed during a job based on file metadata. A filter is used for the query listed in the same CSV row and is applied to all files.
For example, to execute a specific query exclusively on files categorized as “report”, include the filter {“category": "report”} in the corresponding column. (Assuming your files have a “category” metadata field with the value “report”.)
You can use filters to run the same query on different files. To do this, copy your query to a new row and set a filter indicating the file you want to run it on.
For more information, see Filtering Logic.
query labelThe name under which you want this query to be displayed on the results page. For example, for a query “Who is the chairman?”, you may want the label to be just “Chairman”.No
group nameThe name of a query group you want this query to be displayed in on the results page. You can group your queries to make the results easier to interpret. For example, for a query like "What's the property address?", a group name could be "Address".No


Here’s the query set template we prepared to help you get started: Template for batch QA.

Example Query Sets

With Filters and Labels

This query set applies filters to specify the file where the model looks for the answer to a particular query. It also assigns query labels to the queries and groups them:

And here’s what it looks like on the results page:

Shared jobs page with the title at the top, then group names, and then query names and answers.

Query labels are shown instead of whole query texts, and they’re grouped by the group names you assigned to them in the CSV. When sharing the job, you can also add a title that's visible at the top and bottom of the page.

Without Labels

This query set uses filters to narrow down the search but doesn't group the queries or assign labels to them; that's why the query label and group name columns are empty.

This is what it looks like on the results page:

The results page with queries as they were in the query set, no groupings, no labels.

The queries are displayed exactly as they were in the query column of the query set; they're not grouped. The page uses the default title Job Report, but because it wasn't specified on the Share Job modal, it's not showing at the top of the page.

One Query Against Multiple Files

You can ask the same query against multiple files in your workspace. To do this, add the same query in a new row and specify a different file name in the Filters column, like this:

On the results page, you'll simply see the query repeated, with a different answer each time:

Upload a Query Set

You add your query set when creating a job. You can then also select previously uploaded query sets. For details, see Create a Job.