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

# CSV Lookup

> Upload CSV files, define search columns and retrieve results through a tool.

A **CSV Lookup tool** searches an uploaded CSV or TSV file using defined columns. The assistant takes the search values from the conversation. It receives the selected return columns from the matching rows.

The file is uploaded once and prepared for searching. During a conversation, the assistant receives only the selected values from matching rows. The entire table is not inserted into every conversation.

> [card] [Search during a conversation](#create-a-csv-lookup-tool)
>
> A tool searches using values from the conversation, such as an article or order number.

> [card] [Recognize callers in advance](https://app.miyon.ai/docs/en/inbound-csv-lookup.md)
>
> An Inbound Webhook searches before answering a call, for example using the caller's number.

## File, search and tool

| Term | Meaning |
| - | - |
| **CSV source** | The uploaded table. Manage it under **Knowledge Base → CSV sources** or directly in the voice agent's wizard. |
| **Search configuration** | The combination of one to three columns used to find matching rows. The application creates the required search index. |
| **CSV Lookup tool** | Defines which values the assistant passes, what those values mean and which columns it receives in the response. |

One source can serve multiple tools and Inbound Webhooks. If two configurations use the same search columns, the existing search is reused. Different return columns or descriptions do not require another search index.

## Create a CSV Lookup tool

Open **Tools → Create tool → CSV Lookup**. You can also create the tool in a voice agent's **Tools** tab. If the entry is missing, CSV Lookup must first be enabled for your tenant.

### 1. Choose a file

Upload your CSV or TSV file or choose a file already uploaded to your tenant. An existing upload does not need to be repeated for every tool.

The file name is used to suggest a tool name. Give it a clear name, such as **Produktinformationen finden**. Wait until the file has been processed and the preview appears. **Continue** is then available.

![CSV Lookup with an uploaded product catalog and preview](https://mintcdn.com/miyon/OfBdKe6ObWa1SiJb/images/csv-lookup/tool-file.png?fit=max\&auto=format\&n=OfBdKe6ObWa1SiJb\&q=85\&s=9a2666335ec1b8429b08359e57a8dede)

The first step shows the tool name, detected row count and a sample of the file.

### 2. Choose search and return columns

* Under **Search by**, select one to three columns whose values the assistant should pass to the search.
* Under **Return**, select the columns the assistant should receive from the matching rows.

All return columns are selected initially. Remove fields the assistant does not need. This keeps the response readable and uses less context.

![Separate selections for search columns and return columns](https://mintcdn.com/miyon/OfBdKe6ObWa1SiJb/images/csv-lookup/tool-columns.png?fit=max\&auto=format\&n=OfBdKe6ObWa1SiJb\&q=85\&s=128358def432859b6cdaff8c26af6390)

The search uses the article number. The assistant receives four selected product details.

> [!NOTE]
>
> With multiple search columns, **all values must match in the same row**. `article_id` and `color` therefore mean: matching article number **and** matching color. Additional search columns are not alternative ways to search.

Choosing **Continue** starts preparing the search. You can already describe the inputs in the next step.

### 3. Explain the inputs

For each search column, describe the value the assistant should take from the conversation. Enter an explanation here, not a fixed search value.

For `article_id`, for example:

```text theme={null}
Die Artikelnummer des gewünschten Produkts aus dem Gespräch, zum Beispiel A-104.
```

![Description of the article number for the assistant](https://mintcdn.com/miyon/OfBdKe6ObWa1SiJb/images/csv-lookup/tool-inputs.png?fit=max\&auto=format\&n=OfBdKe6ObWa1SiJb\&q=85\&s=982b9ccf380d62476a584d90a110adb3)

The description explains the parameter's meaning. The assistant takes its actual value from the conversation later.

### 4. Test the search and save the tool

Enter a value from your file for each search column and click **Run test**. Check the returned values in the table or JSON view. Click **Create tool** to save the tool.

![Successful search test with product name, price, stock and delivery time](https://mintcdn.com/miyon/OfBdKe6ObWa1SiJb/images/csv-lookup/tool-test.png?fit=max\&auto=format\&n=OfBdKe6ObWa1SiJb\&q=85\&s=b2ccca738c135d1b8c5d08a21f17bda1)

The search test returns the data for A-104 from the uploaded table.

> [accordion] View the same response as JSON
>
> The JSON view shows the same selected return columns as the table.
>
> ![JSON view of the response for item A-104](https://mintcdn.com/miyon/OfBdKe6ObWa1SiJb/images/csv-lookup/tool-test-json.png?fit=max\&auto=format\&n=OfBdKe6ObWa1SiJb\&q=85\&s=47243ea8edb9a5ffa41ee40e8cd4cee4)

This test checks the data query. To check whether the assistant selects the correct tool and arguments in a conversation, follow it with a test conversation.

## Enable the tool for an assistant

Open the desired voice agent and enable the saved tool under **Tools**. A globally created tool is not automatically active in every agent.

Describe when it should be used in the **Condition**. The condition guides when to use it; the descriptions under **Inputs** explain its parameters.

```text theme={null}
Verwende „Produktinformationen finden“, wenn der Anrufer nach Preis,
Verfügbarkeit oder Lieferzeit eines Produkts fragt. Nutze die im Gespräch
genannte Artikelnummer. Erfinde keine Produktdaten, wenn kein Treffer vorliegt.
```

Then use a value from your file in a test conversation to check whether the assistant calls the tool and uses the returned data.

See the [Tools Guide](https://app.miyon.ai/docs/en/tools.md) for global and agent-specific conditions.

## How values are matched

CSV Lookup searches for complete values. Matching ignores letter case and whitespace at the beginning and end. `a-104` therefore finds `A-104`.

This search does not provide fuzzy matching, substring searches or numeric ranges. `104` does not replace `A-104`. Numbers, article numbers and phone numbers are retained as text; `00123` remains different from `123`.

Empty search inputs are not allowed. A row with an empty value in a required search column is not found by that search configuration.

### Multiple results

A tool can return multiple matching rows. The search test shows at most the currently allowed number of results. If there are further matches, the interface shows the actual displayed count and a notice. This is not the total match count.

> [!WARNING]
>
> The search test and the assistant's tool call follow different rules: the test may show a partial result. The current tool call during a conversation requires a complete result within its **20-row** limit. More matches cause an error there. Choose search columns that narrow down the desired records sufficiently.

The [Inbound Webhook](https://app.miyon.ai/docs/en/inbound-csv-lookup.md) requires exactly **one** matching row.

## Manage CSV sources

Under **Knowledge Base → CSV sources**, you can find your files, their current state and where they are used. You can also manage sources directly in the voice agent's wizard. Click a row to view its search configurations.

![CSV sources with file names and associated tools or Inbound Webhooks](https://mintcdn.com/miyon/OfBdKe6ObWa1SiJb/images/csv-lookup/sources.png?fit=max\&auto=format\&n=OfBdKe6ObWa1SiJb\&q=85\&s=690d45d5bfc716f07b0ee8d5c2f87677)

One file is used by the Inbound Webhook, the other by the product tool.

### Search configurations and available slots

The detail view shows search columns, status and associated tools or Inbound Webhooks. Each source supports up to **5 search configurations**.

![A CSV source's search configuration, status and usage](https://mintcdn.com/miyon/OfBdKe6ObWa1SiJb/images/csv-lookup/source-details.png?fit=max\&auto=format\&n=OfBdKe6ObWa1SiJb\&q=85\&s=13e77129f1c3eeae88aa1fa7fcfd4a21)

The search by phone\_number is used by the customer service assistant.

You can remove an unused search configuration. A failed preparation can be retried. While a tool or saved Inbound configuration references the search, deletion is blocked. This also applies to disabled configurations.

### Update a file

Click **Update file** in the source list and choose the new file. The update begins as soon as you select it.

![Update file dialog with required columns for existing configurations](https://mintcdn.com/miyon/OfBdKe6ObWa1SiJb/images/csv-lookup/source-update.png?fit=max\&auto=format\&n=OfBdKe6ObWa1SiJb\&q=85\&s=060e391064db3b39e23ef3971d7d8a73)

Before replacing the file, the dialog shows which columns are still required.

Updating a file works as follows:

1. The new file is uploaded and checked.
2. Existing searches are prepared for the new data.
3. The new version becomes active only after preparation succeeds.

The previous data remains available until then. After a successful update, **all associated tools and Inbound Webhooks** automatically use the new file version. Tool associations, input descriptions, return columns and Inbound mappings are preserved.

![File update progress with a note about the file that remains active](https://mintcdn.com/miyon/OfBdKe6ObWa1SiJb/images/csv-lookup/source-update-processing.png?fit=max\&auto=format\&n=OfBdKe6ObWa1SiJb\&q=85\&s=a4fb500d04f17accd085563a25a3d2e3)

While the new version is being processed, the previous file remains available.

Columns are matched by their headers. Keep the required headers unchanged. If a used column is missing, the update fails and the old version stays active. The interface names the missing columns.

You can close the **Update file** window at any time. Once the file check starts, you can also close the browser tab; the update then continues in the background. **Cancel update** stops the operation and keeps the previous version.

### Delete a source

Open **⋯ → Delete** on the source. If a tool or Inbound Webhook still uses the file, the application lists those uses and prevents deletion. Remove or change the relevant associations first. Simply disabling them is not enough.

![Source deletion blocked because of an Inbound Webhook association](https://mintcdn.com/miyon/OfBdKe6ObWa1SiJb/images/csv-lookup/source-in-use.png?fit=max\&auto=format\&n=OfBdKe6ObWa1SiJb\&q=85\&s=d7c67f209b04fc7b6ab62a59c107baad)

A source in use is not deleted. The dialog shows the remaining connection.

For an unused source, confirm deletion. Cleanup runs in the background; **Deleting…** appears until it finishes. A failure stays visible and can be retried.

Deleting a tool does not automatically remove the file. Similarly, a successfully imported upload can remain in the source list if you then cancel the tool wizard. You can reuse it or delete it from the source list.

## File format and limits

Use a **UTF-8 file with column headers in the first row**. Each subsequent row is a record. Choose unique, meaningful headers and avoid extra blank lines.

* **CSV:** Comma, semicolon, tab and pipe delimiters are detected automatically.
* **TSV:** Columns are separated by tabs.
* Values containing delimiters or line breaks must be correctly quoted.
* Excel files such as `.xlsx` must first be exported as CSV. Changing the extension alone does not convert a file.
* If you edit the file in Excel, use the **Text** cell format for phone numbers, postal codes and IDs. Otherwise, for example, `00123` may become `123`, or a phone number may lose its `+`.

The following values are standard limits. Your tenant may have different upload or search limits configured; the limit displayed there applies.

A CSV source counts once, even if multiple tools or agents use it.

| Area | Standard limit |
| - | - |
| Data rows per file | 100,000, excluding the header row |
| File size | 50 MB |
| Columns per file | 20 |
| CSV sources per tenant | 100 |
| Search configurations per source | 5 |
| Search columns per configuration | 1 to 3 |
| Return columns | At least one, up to all columns in the file |
| Results in the search test | 20 by default; the test uses the current search limit |
| Results in a tool call during a conversation | At most 20; the result must be complete |
| Tool name | 1 to 200 characters |
| Description per input | 1 to 1,000 characters |
| Individual search value | At most 512 UTF-8 bytes; the complete search key limit also applies |

> [accordion] Additional size limits
>
> The search service's standard limits are 64 KiB per cell, 1 MiB per row and 256 KiB per search response. The normalized search key, including its internal length prefixes, must fit within 512 UTF-8 bytes in total. With multiple search columns, their values share this limit. Long text is therefore better suited to return values than search keys.
>
> A result can be too large even with few rows. Return fewer or shorter columns in that case. Larger uploads or different limits must be arranged for your tenant in advance; one million rows is not automatically available by default.

## Troubleshooting

| Observation | What to check |
| - | - |
| **Continue** is unavailable | Is there a tool name, has the import finished, and are one to three search columns and at least one return column selected? Each search field needs a description in the input step. |
| All data appears in one column | Check delimiters and quotes. Export as UTF-8 CSV or TSV and upload the file again. |
| No match | Compare the complete value with the file, including hyphens, leading zeros and phone number format. With multiple search columns, all must match. |
| Too many results | The test shows a limited sample. A tool call needs a sufficiently specific search key to stay within its result limit. |
| Search is being prepared | The search configuration is not ready yet. Wait for **Ready**; use the offered retry if preparation fails. |
| An update is already running | Let the existing operation finish or cancel it using its own cancellation control. |
| The assistant answers without calling the tool | Check activation in the correct agent, its tool condition and the input descriptions. A successful direct search test does not check the AI's tool selection. |
| An operation remains unchanged unusually long | Open the source list again. If no error or retry is offered, give support the file name, time and affected assistant. |

> [!NOTE]
>
> The screenshots show the German interface. An execution time shown in a test is a single measurement, not a guaranteed response time.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.