QnA CSV

Import structured question-answer pairs from CSV files to quickly build a comprehensive FAQ knowledge base for your AI agents.

Overview

Property
Details

Type

Static

Refresh

Manual

Tier

1 (All Plans)

Format

CSV with Question & Answer columns

Encoding

UTF-8 recommended

When to Use QnA CSV

The QnA CSV connector is ideal for:

  • FAQs - Frequently Asked Questions

  • Knowledge Base Migration - Importing existing Q&A databases

  • Structured Training - Teaching AI specific responses

  • Curated Content - Hand-crafted question-answer pairs

  • Quick Setup - Rapidly deploying AI agents with known Q&As

CSV File Format

Required Columns

Your CSV file must contain these two columns (case-insensitive):

Column Name
Required
Description

Question or question

Yes

The question text

Answer or answer

Yes

The corresponding answer

CSV Structure Example

With Additional Columns (Optional)

You can include additional columns for your reference, but only Question and Answer are processed:

Creating Your QnA CSV File

Using Microsoft Excel

  1. Open Excel

  2. Create headers: Question in column A, Answer in column B

  3. Fill in your question-answer pairs

  4. Click FileSave As

  5. Choose CSV (Comma delimited) (*.csv) format

  6. Save the file

Using Google Sheets

  1. Open Google Sheets

  2. Create headers: Question in column A, Answer in column B

  3. Fill in your question-answer pairs

  4. Click FileDownloadComma-separated values (.csv)

Using a Text Editor

Create a plain text file with .csv extension:

Important: Use quotes around values containing commas, newlines, or quotes.

How to Add QnA 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 QnA CSV Connector

  1. Choose QnA as a CSV from the list

  2. The connector shows: "CSV file with a Question & Answer columns"

Step 3: Configure the Data Source

Basic Information

  • Name (required): Descriptive name for your Q&A collection

    • Example: "Product FAQ", "Customer Support Q&A", "Technical FAQs"

  • Description (optional): Additional context

    • Example: "Top 100 customer questions from Q4 2023"

File Upload

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

  2. Upload your .csv file

  3. Wait for upload completion

Tags (Optional)

  • Add organizational tags

  • Examples: "faq", "customer-support", "product", "technical"

Step 4: Save and Process

  1. Click Save or Create

  2. The system will validate and process your CSV

  3. Check for any errors in the process logs

Step 5: Verify Import

  1. Check the record count matches your CSV rows

  2. Review status: should show "END_PROCESS"

  3. Test by asking questions from your CSV

Best Practices

1. Question Formatting

Good Questions:

  • Natural language: "How do I reset my password?"

  • Multiple phrasings: Include variations people might ask

  • Clear and specific: "What is the refund policy for digital products?"

Avoid:

  • Too vague: "Help?"

  • Keywords only: "password reset"

  • Multiple questions in one: "How do I reset password and change email?"

2. Answer Quality

Good Answers:

  • Complete: Provide full information

  • Actionable: Include specific steps

  • Concise: Stay on topic

  • Formatted: Use clear structure

Example:

3. Content Organization

Group Related Topics:

4. Handling Special Characters

Commas in Text:

Quotes in Text:

Newlines in Answers:

CSV Format Requirements

Encoding

  • Recommended: UTF-8

  • Ensures proper handling of special characters

  • Save with UTF-8 encoding in your editor

Delimiters

  • Comma (,) - Standard and recommended

  • Other delimiters may not be supported

Headers

  • Must have a header row

  • Column names: Question and Answer (case-insensitive)

  • No spaces before/after column names

Row Limits

  • Varies by plan

  • Split large CSVs into multiple data sources if needed

Examples

Example 1: Customer Support FAQ

Example 2: Technical Documentation

Example 3: Product Information

Updating Your QnA CSV

Since this is a static connector:

To Add Questions:

  1. Update your CSV file with new rows

  2. Re-upload the updated CSV file

  3. The system will reprocess all content

To Modify Existing Questions:

  1. Edit your CSV file

  2. Re-upload the complete file

  3. Previous version will be replaced

Best Practice:

  • Keep a master CSV file

  • Version your files: faq-v1.csv, faq-v2.csv

  • Document changes in a separate changelog

Troubleshooting

CSV Not Parsing

Problem: File uploaded but no questions imported

Solutions:

  • Verify headers are exactly Question,Answer

  • Check for UTF-8 encoding

  • Ensure proper comma separation

  • No empty rows between data

Missing Questions

Problem: Some questions not imported

Solutions:

  • Check for empty Answer fields (not allowed)

  • Verify no malformed CSV rows

  • Look for unescaped quotes or commas

  • Check character encoding issues

Incorrect Formatting

Problem: Answers appear garbled or broken

Solutions:

  • Re-save CSV with UTF-8 encoding

  • Properly escape special characters

  • Use quotes around fields with commas

  • Check for hidden characters

AI Not Using Q&A

Problem: AI doesn't reference imported Q&As

Solutions:

  • Verify questions match how users actually ask

  • Check processing completed successfully

  • Ensure AI agent has access to this data source

  • Test with exact questions from CSV first

Advanced Tips

1. Question Variations

Include multiple variations of the same question:

2. Context in Answers

Provide rich context to help AI understand when to use each answer:

3. Cross-References

Link related topics in answers:

Next Steps

After importing your QnA CSV:

  1. Test the knowledge by asking questions

  2. Create targeted AI agents for specific topics

  3. Iterate and improve your Q&A content based on analytics

Last updated