# Add text snippets and Q&A pairs to your agent

> Add text snippets and Q&A pairs to an intoCHAT agent: other phrasings, CSV and Excel import and export, why Q&A answers rank first and how to write good pairs.

Text snippets and Q&A pairs let you write knowledge yourself, without a website or a file. Both are added on the **Knowledge** tab, take effect after training and can be edited at any time.

## Text snippets

A text snippet is any text you paste or write: a policy, opening hours, a product description, or details your website doesn't mention.

1. Under **Add knowledge**, choose **Text**.
2. Enter a **Title**, for example "Shipping policy". It is optional, but recommended.
3. Paste or write the **Content**. The counter below shows its length in characters.
4. Click **Add text**, then **Train agent**.

The title becomes the source name and is indexed with every passage of the snippet, which helps search find it. Without a title, the first words of the text are used.

## Q&A pairs

A Q&A pair is one question with the answer you want your agent to give.

1. Under **Add knowledge**, choose **Q&A**.
2. Enter the **Question**, for example "What is your refund policy?". It can be up to 200 characters.
3. Optionally, under **Other phrasings**, click **Add a phrasing** for each other way visitors ask the same thing.
4. Enter the **Answer**.
5. Click **Add Q&A pair**, then **Train agent**.

Question and answer are required. The question becomes the source name.

Each agent has one pair per question. If you add a pair whose question already exists, ignoring upper and lower case and extra spaces, the existing pair is updated instead of copied: it takes the answer from the form, and the other phrasings too if you typed any (with none typed, it keeps its own), and you see "Q&A updated". If nothing differs from the saved pair, nothing is saved and you see "Already saved". Editing a pair's question to one that another pair already has is refused.

## Other phrasings

Visitors ask the same thing in different words: "What is your refund policy?", "Can I get my money back?", "Do you take returns?". Add up to 5 other phrasings to a pair, each up to 200 characters. All of them lead to the same answer.

The phrasings are trained together with the question and answer as one passage, so search sees the words of every phrasing. Empty phrasings, and ones that repeat the question or another phrasing, are dropped when you save. To change the phrasings of an existing pair, edit it with the pencil icon under **Knowledge sources**, then train. The source list shows how many other phrasings a pair has, and **Search sources…** also finds pairs by their phrasings.

Phrasings count toward the agent's character limit, like the question and answer.

## Import and export Q&A pairs

Below the Q&A form, **Many pairs at once** has two buttons.

**Export CSV** downloads all of the agent's Q&A pairs as a CSV file with three columns: `question`, `answer` and `variants`. Other phrasings share the `variants` cell, separated by ` | `. The file opens correctly in Excel, accents included, and can be imported again unchanged.

**Import file** reads pairs from a spreadsheet:

1. Prepare a CSV, XLSX, XLSM or ODS file of up to 4 MB. CSV files can use commas, semicolons or tabs as separators. In a workbook with several sheets, the first sheet whose first row names a question and an answer column is used, otherwise the first sheet.
2. Put the question and the answer in their own columns. A third column for other phrasings is optional; separate them with `|` or put each on its own line in the cell.
3. Click **Import file** and choose the file. Nothing is saved yet.
4. Check the preview, then click the import button, for example **Import 25 pairs and train**. Training starts right away.

The first row is read as a header when it names both a question and an answer column. These titles are recognized, ignoring upper and lower case and accents:

| Column | Recognized titles |
|---|---|
| Question | question, questions, q, faq question, frage, fragen, domanda, domande, pregunta, preguntas |
| Answer | answer, answers, a, reply, response, antwort, antworten, réponse, réponses, risposta, risposte, respuesta, respuestas |
| Other phrasings | variants, variant, variations, phrasings, alternative questions, other phrasings, alternatives, varianten, formulierungen, alternativen, alternative fragen, variantes, formulations, autres formulations, varianti, variazioni, formulazioni, domande alternative, variaciones, formulaciones, preguntas alternativas |

Without such a header, column A is read as the questions, B as the answers and C as the other phrasings, starting from the first row. The preview says when this happens.

The preview counts new pairs, pairs that update an existing one with the same question, pairs that are already up to date and skipped rows. It shows the first rows with their result and lists up to 10 skipped rows with the reason:

- No question, or no answer.
- A question or phrasing longer than 200 characters.
- The same question as an earlier row in the file.

A row with more than 5 other phrasings is still imported with the first 5, and the preview notes it. An empty phrasings cell keeps the phrasings an existing pair already has. Blank rows are ignored.

One file can hold up to 1,000 rows; further rows are not imported, and the preview tells you how many. The preview also shows how many of your plan's characters the agent will use after the import. If the import would go over the limit, nothing is imported at all, and the import button stays disabled until you remove rows from the file, delete other sources or upgrade.

## Improve answers from conversations

When you find a weak reply in a transcript on the **Conversations** tab, click **Improve answer** under it. It opens a Q&A pair already filled with the visitor's question and the agent's reply, for you to correct and save. Saving adds the pair, or updates the pair with the same question, and trains it. See [Conversations and stats](/en/docs/conversations-and-dashboard).

## How Q&A pairs rank

Q&A pairs are the most trusted kind of knowledge:

- When a pair closely matches a visitor's question, it is placed before any page, file or snippet.
- When several matches are close, the Q&A pair wins. When sources disagree, the model is told to follow your Q&A answer.

The agent still writes the reply itself, in the visitor's language and in the tone of your instructions, so it may shorten or rephrase your answer. Q&A pairs can't be marked as priority, because they already rank first. See [How answers work](/en/docs/how-answers-work) for the full order.

## When to use which

| Situation | Use |
|---|---|
| A frequent question that must be answered one way: prices, refund rules, delivery times | Q&A pair |
| A wrong or vague answer you noticed in the Playground or in Conversations | Q&A pair, for example with **Improve answer** |
| An existing FAQ in a spreadsheet | Q&A import |
| Longer background on one topic: a policy, a product overview, what a service includes | Text snippet |
| Facts that are missing from your website or only shown in images there | Text snippet |

## Writing tips

- **One question per pair.** Add separate pairs for separate questions instead of one pair that answers three.
- **Use your visitors' words.** Search matches on meaning and on keywords, so include the terms, product names and codes visitors actually type. If a question is asked in very different ways, add those wordings as other phrasings.
- **Make each answer complete on its own.** Include the link, price or condition the visitor needs.
- **Keep a pair under about 1,500 characters, phrasings included.** A pair that fits in one passage is always found as a whole.
- **One topic per snippet.** Separate snippets about shipping and returns are easier to find than one long text about everything.
- **Keep them current.** An old Q&A answer outranks a correct, newer web page. When a fact changes, edit the pair and train again.

Text snippets and Q&A pairs count toward the agent's character limit like any other source. To edit, preview or delete them, see [Managing sources](/en/docs/managing-sources).
