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

# Tables

> Use search tables for structured knowledge retrieval

Search tables let your AI query structured datasets. Unlike text-based knowledge that returns paragraphs, tables return specific records matching multiple criteria, for example products by category and price range, or customers by location and status.

## Creating a Table

1. On the [Knowledge page](https://platform.botbrains.io/~/dataproviders), click **Add Table**, enter a name and click **Create**
2. Click **Import** and upload your data as CSV, JSONL, or JSON
3. Configure field types and search types for each column
4. Click **Verify data** to validate, then **Save Changes**

| Import format | Best for |
| - | - |
| CSV | Spreadsheet exports. First row must contain headers |
| JSONL | Database exports. One JSON object per line, preserves data types |
| JSON | Complete table definitions. Format: `{"objects": [...], "fields": [...]}` |

![Table editor for a product catalog after import, with each column's field type and search type (Search text, Select, Range filter, Toggle), fill statistics and the imported rows](https://mintcdn.com/botbrains/l5xn3aEFMtkQ541l/images/tables/create-table-interface.png?fit=max\&auto=format\&n=l5xn3aEFMtkQ541l\&q=85\&s=1abe7a8d50911bc31dbef20d3357ba76)

## Field Types

| Type | Examples |
| - | - |
| Text | Names, descriptions, IDs |
| Number | Prices, quantities, scores |
| Date | Date only (2024-01-15) |
| datetime | Date and time with timezone |
| boolean | True/false values |
| JSON | Nested objects |
| Vector | Embedding vectors for semantic search |
| Array | Lists of values |

## Search Types

Search types control how the AI can filter each field. Fields set to "Same as data type" are display-only (no filtering).

| Field type | Available search types |
| - | - |
| Text | Search text (full-text with partial matching), Select (single value, max 500 unique), multiselect (multiple values, max 500 unique) |
| Number | Range filter (min/max) |
| Date/datetime | datetime filter (date range) |
| boolean | Toggle (true/false filter) |
| JSON, Vector, Array | Display only |

> [!WARNING]
>
> Select and multiselect only work when a field has 500 or fewer unique values.

> [!NOTE]
>
> Sorting isn't supported yet. The AI can filter records but can't order results by a specific field.

## Attaching Tables to AI

Configure your table as a tool so the AI can search it:

1. Open the [Actions tab](https://platform.botbrains.io/~/profiles?tab=actions) and scroll to **Search Tables**
2. Click **Add Search Table**
3. Set a **Tool Name** (for example, `search_products`)
4. Write a **Tool Description** explaining what data the table contains and when to search it
5. Select your table and save

The AI generates search parameters from natural language questions automatically. Write clear tool descriptions so the AI knows when to use the table versus other knowledge sources.

Remember to [enable the tool](https://docs.botbrains.io/guides/instruct-ai-agent.md#tools) on the relevant guidance rules.

![Add Search Table dialog with Tool Name, Tool Description and table selector](https://mintcdn.com/botbrains/l5xn3aEFMtkQ541l/images/tables/search-table-tool-config.png?fit=max\&auto=format\&n=l5xn3aEFMtkQ541l\&q=85\&s=71a4ba259ca5cbe5390dcf8130d58a13)

## Updating Data

Importing a file replaces all existing data. To preserve your field configuration when updating:

1. Export your table as JSON
2. Update the `objects` array with new data
3. Re-import the JSON file
4. Verify data and [rebuild](https://docs.botbrains.io/concepts/versioning.md)


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