Product
QnA CSV
Import question-answer pairs from CSV
TL;DR
Import question-answer pairs from CSV. | Property | Value | | ----------------- | ---------------------------------------- | | Type | Static (manual upload) | | Sync | Manual only ...
Key Takeaways
- Overview
- Use Cases
- CSV Format
- Creating Your QnA CSV File
- How to Add QnA CSV
- Best Practices
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
question,answer
What are your business hours?,We are open Monday-Friday 9 AM-5 PM EST.
How do I reset my password?,Click 'Forgot Password' on the login page and follow the email instructions.
What payment methods do you accept?,We accept Visa, Mastercard, Amex, and PayPal.
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
question,answer
"What's included: features, pricing, and support?","Includes features, pricing, and 24/7 support."
Quotes in text: Double them
question,answer
"What does ""premium"" mean?","Premium means full access."
Newlines: Use quotes and literal newlines
question,answer
"How do I contact support?","Email: support@example.com
Phone: 1-800-123-4567
Chat: Available on website"
Creating Your QnA CSV File
Using Microsoft Excel
- Open Excel
- Create headers:
Questionin column A,Answerin column B - Fill in your question-answer pairs
- Click File → Save As
- Choose CSV (Comma delimited) (*.csv) format
- Save the file
Using Google Sheets
- Open Google Sheets
- Create headers:
Questionin column A,Answerin column B - Fill in your question-answer pairs
- Click File → Download → Comma-separated values (.csv)
Using a Text Editor
Create a plain text file with .csv extension:
Question,Answer
"What is your return policy?","We offer 30-day returns on all unused products with original packaging."
"Do you ship internationally?","Yes, we ship to over 50 countries worldwide."
Important: Use quotes around values containing commas, newlines, or quotes.
How to Add QnA CSV
Step 1: Navigate to Data Sources
- Log in to your Twig AI account
- Click Data in the main navigation menu
- Click Add Data Source or the + button
Step 2: Select QnA CSV Connector
- Choose QnA as a CSV from the list
- 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
- Click Choose File or drag-and-drop your CSV file
- Upload your
.csvfile - Wait for upload completion
Tags (Optional)
- Add organizational tags
- Examples: "faq", "customer-support", "product", "technical"
Step 4: Save and Process
- Click Save or Create
- The system will validate and process your CSV
- Check for any errors in the process logs
Step 5: Verify Import
- Check the record count matches your CSV rows
- Review status: should show "END_PROCESS"
- 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:
Question,Answer
How do I reset my password?,"To reset your password:
1. Go to the login page
2. Click 'Forgot Password'
3. Enter your email address
4. Check your email for reset link
5. Follow the link and create new password
The link expires in 24 hours."
3. Content Organization
Group Related Topics:
Question,Answer
[Product] What is Product X?,[Detailed description]
[Product] How much does Product X cost?,[Pricing details]
[Shipping] How long does shipping take?,[Shipping timeframes]
[Shipping] What are shipping costs?,[Shipping costs]
4. Handling Special Characters
Commas in Text:
Question,Answer
"What's included: features, pricing, and support?","Product includes features, competitive pricing, and 24/7 support."
Quotes in Text:
Question,Answer
"What does ""premium"" mean?","Premium means access to all advanced features."
Newlines in Answers:
Question,Answer
How do I contact support?,"You can reach us via:
- Email: support@example.com
- Phone: 1-800-123-4567
- Live Chat: Available on our website"
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:
QuestionandAnswer(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
Question,Answer
How do I track my order?,"Log into your account, go to 'My Orders', and click on the order number to see tracking information."
What is your return policy?,"We accept returns within 30 days of purchase. Items must be unused and in original packaging."
Do you offer gift wrapping?,"Yes, gift wrapping is available for $5 per item during checkout."
Example 2: Technical Documentation
Question,Answer
What API version should I use?,"We recommend using API v2. API v1 is deprecated and will be sunset on December 31, 2024."
How do I authenticate API requests?,"Include your API key in the Authorization header: 'Authorization: Bearer YOUR_API_KEY'"
What is the rate limit?,"Standard accounts have 1000 requests/hour. Premium accounts have 10000 requests/hour."
Example 3: Product Information
Question,Answer
What are the system requirements?,"Windows 10 or later, 8GB RAM minimum, 16GB recommended, 500MB free disk space."
Is there a mobile app?,"Yes, our mobile app is available for iOS 14+ and Android 10+ devices on App Store and Google Play."
Can I use this offline?,"Yes, core features work offline. Sync occurs automatically when you reconnect to the internet."
Updating Your QnA CSV
Since this is a static connector:
To Add Questions:
- Update your CSV file with new rows
- Re-upload the updated CSV file
- The system will reprocess all content
To Modify Existing Questions:
- Edit your CSV file
- Re-upload the complete file
- 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:
Question,Answer
How do I reset my password?,Click 'Forgot Password' on login page...
I forgot my password,Click 'Forgot Password' on login page...
Can't log in - forgot password,Click 'Forgot Password' on login page...
Password reset help,Click 'Forgot Password' on login page...
2. Context in Answers
Provide rich context to help AI understand when to use each answer:
Question,Answer
What's the shipping time?,"Standard shipping takes 5-7 business days within the continental US. Express shipping takes 2-3 business days. International shipping varies by destination (7-21 business days)."
3. Cross-References
Link related topics in answers:
Question,Answer
How do I return a product?,"We accept returns within 30 days. See our full return policy for details. For exchange information, ask about our exchange process."
Next Steps
After importing your QnA CSV:
- Test the knowledge by asking questions
- Create targeted AI agents for specific topics
- Monitor which questions users ask
- Iterate and improve your Q&A content based on analytics
Related Connectors
- Data CSV - Import tabular data
- Files - Upload document files
- Website - Crawl FAQ pages
- Confluence - Sync wiki-based Q&As
Agent Instructions: Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.
Perform an HTTP GET request on the current page URL with the ask query parameter:
GET /dev/product/data-integrations/qna-csv.md?ask=<question>
The question should be specific, self-contained, and written in natural language. The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.
Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
Related Pages
Integrations
Industries
Last updated January 26, 2026


