CSV Data Import

Import structured tabular data from CSV files to provide your AI agents with searchable databases, product catalogs, pricing information, and other structured datasets.

Overview

Property
Details

Type

Static

Refresh

Manual

Tier

2 (Professional & Enterprise)

Format

CSV with any column structure

Encoding

UTF-8 recommended

When to Use Data CSV

The Data CSV connector is ideal for:

  • Product Catalogs - Product names, descriptions, SKUs, pricing

  • Employee Directories - Staff information and contact details

  • Inventory Data - Stock levels, warehouse locations

  • Pricing Tables - Service tiers, feature matrices

  • Location Data - Store addresses, hours, contact information

  • Statistical Data - Reports, metrics, KPIs

Difference from QnA CSV

Feature
QnA CSV
Data CSV

Purpose

Question-Answer pairs

Structured tabular data

Columns

Must have Question & Answer

Any column structure

Use Case

FAQs, knowledge base

Databases, catalogs, lists

Tier

1 (All plans)

2 (Professional+)

CSV File Format

Flexible Column Structure

Unlike QnA CSV, Data CSV accepts any column structure:

Multi-Column Examples

Employee Directory:

Store Locations:

Pricing Table:

How to Add Data CSV

Step 1: Navigate to Data Sources

  1. Log in to your Twig AI account

  2. Click Data in the main navigation menu

  3. Click Add Data Source or the + button

Step 2: Select Data CSV Connector

  1. Choose Data as a CSV from the list

  2. The connector shows: "Tabular data as a CSV file"

  3. Note: Available on Professional and Enterprise plans

Step 3: Configure the Data Source

Basic Information

  • Name (required): Descriptive name for your dataset

    • Example: "Product Catalog 2024", "Employee Directory", "Store Locations"

  • Description (optional): Context about the data

    • Example: "Complete product catalog with pricing and availability"

File Upload

  1. Click Choose File or drag-and-drop your CSV file

  2. Upload your .csv file

  3. Wait for upload to complete

Tags (Optional)

  • Add tags for organization

  • Examples: "product", "pricing", "internal", "public"

Step 4: Save and Process

  1. Click Save or Create

  2. System will parse and index your tabular data

  3. Monitor the processing status

Step 5: Verify Import

  1. Check record count matches CSV rows

  2. Verify status shows "END_PROCESS"

  3. Test by asking questions about the data

Creating Effective Data CSVs

1. Use Clear Column Headers

Good:

Avoid:

2. Consistent Data Formatting

Good:

Avoid:

3. Include Descriptive Information

Good:

Better:

4. Handle Missing Data

Use consistent representations for missing data:

Examples by Use Case

Example 1: Product Catalog

Questions AI can answer:

  • "What widgets do you have?"

  • "How much is the Deluxe Widget?"

  • "What's in stock?"

  • "Show me products under $200"

  • "What services do you offer?"

Example 2: Office Locations

Questions AI can answer:

  • "Where are your offices located?"

  • "What's the phone number for the Boston office?"

  • "What are the hours for the London office?"

  • "Which offices provide R&D services?"

Example 3: Pricing Plans

Questions AI can answer:

  • "What plans do you offer?"

  • "What's included in the Professional plan?"

  • "How much does the Starter plan cost annually?"

  • "Which plan is best for a small team?"

  • "Do you offer SSO?"

Example 4: FAQ + Metadata

Best Practices

1. Data Organization

Denormalize for AI: Instead of:

and separate

Use:

2. Include Context in Columns

Add descriptive columns that provide context:

3. Use Full Text, Not Codes

Good:

Avoid:

4. Consistent Formatting

  • Dates: Use ISO format (YYYY-MM-DD)

  • Currency: Include symbols ($99.99 or 99.99 USD)

  • Boolean: Use Yes/No, True/False, or 1/0 consistently

  • Lists: Use semicolons or pipes to separate multiple values

Technical Requirements

File Format

  • Extension: .csv

  • Encoding: UTF-8 (recommended)

  • Delimiter: Comma (,)

  • Line Endings: LF (\n) or CRLF (\r\n)

Size Limits

  • Varies by plan

  • Split large datasets into multiple CSVs if needed

  • Consider sampling for very large datasets

Headers

  • Must have header row with column names

  • No duplicate column names

  • Avoid special characters in column names

Updating Your Data CSV

To update your data:

  1. Edit your local CSV file with changes

  2. Navigate to the data source in Twig

  3. Click Edit

  4. Upload the updated CSV file

  5. Click Save to reprocess

Note: The entire dataset is replaced, not merged.

Troubleshooting

Data Not Searchable

Problem: AI can't find information in the CSV

Solutions:

  • Verify column headers are descriptive

  • Add more descriptive text in columns

  • Include context columns explaining the data

  • Check encoding is UTF-8

Incorrect Data Interpretation

Problem: AI misinterprets the data

Solutions:

  • Use full text instead of abbreviations

  • Add descriptive column names

  • Include units in data (e.g., "Price USD" instead of "Price")

  • Add context columns

Processing Errors

Problem: CSV fails to process

Solutions:

  • Check for malformed CSV (missing quotes, unescaped commas)

  • Verify file encoding

  • Look for special characters

  • Ensure consistent column count across rows

Missing Rows

Problem: Some rows not imported

Solutions:

  • Check for empty required fields

  • Verify no hidden characters

  • Ensure no duplicate headers

  • Review process logs for specific errors

Advanced Use Cases

1. Multi-Language Support

2. Rich Product Information

3. Hierarchical Data (Flattened)

Next Steps

After importing your Data CSV:

  1. Test queries to verify AI can access the data

  2. Create specialized agents for specific data types

  3. Monitor usage analytics to see how data is queried

  4. Refine and expand your CSV based on user questions

Last updated