> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryxlr8.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Query Generation

> Build reusable query sets with company details, categories, and queries — then pick a set when you create an experiment.

**Query Generation** is where you prepare the queries an experiment will run. Enter company details once, generate or import queries, and save a **query set**. When you create an experiment, you pick a saved set — you do not re-enter type, domain, aliases, or tracked competitors.

From the sidebar under **Strategy**, click **Query Generation**.

## Query sets

Each query set stores:

* Experiment type and subtype
* Company name, website, and aliases
* Tracked competitors (inferred from domain analysis, or from competitor names on Competitor Alternatives and Competitor Comparison)
* Categories and queries
* Optional Keyword Planner keywords and search-volume targeting (language and locations), source citations, and comments

The list shows company, type, category and query counts, and last update. Click anywhere on a row to open the set. Hover a row to download **CSV** or archive it (trash icon) — those actions stay on the list and do not open the set.

Click **New query set** to start. If you already have sets, company fields can be prefilled from the most recent one. Use **Reuse company briefing** to copy type, company, domain, aliases, and Keyword Planner targeting from another set.

## Create a query set

Creating a query set has three steps: **Company**, **Categories**, and **Queries**.

<Steps>
  <Step title="Company — analyze the domain">
    Fill in:

    * **Query set name** (optional — defaults from company and type)
    * **Experiment type** — Visibility Analysis or Sentiment Analysis
    * **Sub-type** — for visibility: Discovery, Informational, or Competitor Alternatives; for sentiment: Competitor Comparison or Brand Sentiment
    * **Company name** (required)
    * **Company website** (required)
    * **Categories & queries CSV** (optional) — upload a CSV with **Category** and **Query** columns to use your own queries instead of AI generation. Click **Download sample CSV** for the format, which includes an optional **Citations** column (max 5MB). Rows without citations are tagged from your briefing (domain analysis, additional context, and sales transcript when those are filled), then enriched from uploaded documents and Keyword Planner data when company details are complete. If you import before filling company details, add them and re-import to enrich tags.
    * **Additional context** (optional) — ICP, goals, known keywords, competitors, phrasing notes
    * **Internal documents** (optional) — PDFs, Office files, text, or images; they are parsed and used when generating queries
    * **Sales transcript** (optional) — `.txt` file

    Click **Analyze domain**. XLR8.ai analyzes the website, prepares category suggestions, and infers **company aliases** and **tracked competitors**. Review and edit those on the next step — they are not entered on this step.
  </Step>

  <Step title="Categories — review and edit">
    For **Competitor Alternatives** and **Competitor Comparison**, this step is labeled **Competitors** instead of **Categories**.

    Review the **Domain description** and category (or competitor) chips. Add, rename, or remove items. If you have fewer than five, use **Generate categories** or **Fill to 5**. **Replace all from website** regenerates the full list from the domain.

    After domain analysis, review **Company aliases** (suggested from the site — add or remove chips) and **Tracked competitors**. For Competitor Alternatives and Competitor Comparison, tracked competitors match the competitor names in that list. For other subtypes, they are inferred from your company and domain and stay separate from query categories.

    Optionally use **Keyword Planner**:

    * Under **Search volume targeting**, pick a **Language** and one or more **Locations**. Both lists are searchable. Volume and competition data use these markets; the default is English and the United States.
    * **Fetch Keyword Planner ideas** using your categories plus extra seed keywords
    * **Add keywords with metrics** for exact keywords (comma or newline separated)
    * Remove any ideas you do not want to use

    Selected keywords and targeting are saved with the query set.

    Set **Queries per category** (1–20, default 5) to control how many queries are generated for each category. Click **Continue** to generate them.
  </Step>

  <Step title="Queries — generate and refine">
    A summary of **Company aliases** and **Tracked competitors** appears at the top — edit aliases on the Categories step. Review the query map. Use the pencil and trash icons on each row to edit or remove queries, or add a query to a category, then save the query set. Each query can show **citation** badges that explain where it came from, such as Domain, Document, Sales, Context, Keyword, Model, Manual, Edited, or CSV. Click a badge to open **Why this query was generated**, with the supporting rationale. For **Document** sources, the panel lists **Source document** and links to download that file when the query set is saved. Queries without stored citation metadata show a **Manual** badge.

    Set **Queries per category** (1–20) and click **Regenerate queries** to run generation again with the current briefing, documents, and Keyword Planner selection. Queries you added or edited stay in the map; new suggestions are added around them. **Download CSV** exports the map (including citations when present).

    Click **Save query set**. After saving, comments become available on this step.
  </Step>
</Steps>

## Edit a saved query set

Open a set from the list to change it. You land on **Queries**. Use **Back to categories** or **Back** to revisit categories and the company briefing. On the Company step, **Re-analyze domain** refreshes the description, category suggestions, aliases, and tracked competitors without losing the set.

Keyword Planner keywords saved on the set refresh their monthly-search and competition metrics when you reopen it, using the language and locations stored on that set.

## Comments

On a saved query set that has queries, a **Comments** sidebar appears on the Queries step.

* Check a query to attach feedback to it, or leave a comment on the whole set.
* Filter by **Open**, **Resolved**, or **All**.
* **Post comment**, **Reply**, **Resolve**, or **Reopen** a thread.

Notifications for query-set comments open that set.

## Use a query set in an experiment

From **Strategy → Experiments**, click **New Experiment**. Step 1 is **Query set** — pick a saved set that already has queries. Experiment type, company, domain, aliases, and tracked competitors come from that set. Use **Manage query sets** or **Edit** if you need to change them first.

Then continue to **Create** to choose models and launch. See [Creating a new experiment](/experiments/overview#creating-a-new-experiment).

<CardGroup cols={2}>
  <Card title="Experiments" icon="flask" href="/experiments/overview">
    Pick a saved query set and launch a visibility or sentiment experiment.
  </Card>

  <Card title="Visibility experiments" icon="eye" href="/experiments/visibility">
    Measure mention rate and citations across AI models.
  </Card>

  <Card title="Sentiment experiments" icon="face-smile" href="/experiments/sentiment">
    Analyze how AI models describe and compare your brand.
  </Card>

  <Card title="Core Concepts" icon="lightbulb" href="/concepts">
    How query sets, category maps, and experiments fit together.
  </Card>
</CardGroup>
