QnA CSV

Import question-answer pairs from CSV.

Overview

Property
Value

Type

Static (manual upload)

Sync

Manual only

Plan

All plans

Format

CSV: Question, Answer columns (required)

Encoding

UTF-8

Max Rows

10,000 per CSV

Max File Size

10MB

Use Cases

  • FAQs: Product questions, support questions

  • Migration: Import existing Q&A from other systems

  • Exact answers: Content that must be worded precisely

  • Fast setup: Deploy agent in minutes with prepared Q&As

CSV Format

Required Columns

Must have exactly these 2 columns (case-insensitive):

Column
Description
Max Length

question or Question

Question text

500 chars

answer or Answer

Answer text

5,000 chars

Example

Additional columns ignored: You can add category, priority, etc. for your reference, but only question and answer are indexed.

Escaping Rules

Commas in text: Use quotes

Quotes in text: Double them

Newlines: Use quotes and literal newlines

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