Working with a simple CSV in AI Resources
Overview
AI Resources enable you to ingest & transform data in a myriad of ways for use in your AI Agents or AI Services. This guide will show you how to upload, transform, and index a simple dataset for use in your AI Agent.
This guide requires the use of some Python for the Transformation steps, all of which can be copied and modified from the guide itself.
Getting Started
To complete this tutorial you can either use our sample Quiqsilver Bikes FAQ CSV or create s CSV that contains Question and Answer columns and some data.
First you'll need to navigate to the Resources option in AI Studio:

Uploading your Dataset
From there you'll be taken into the Datasets, where you'll use the Upload Dataset button to upload your CSV:

Give your Dataset both a Namespace (if you haven't created one already) and a Name:

the Namespace will be the section your Dataset lives in within Datasets , and the Name will be how you reference your specific dataset:

Once you've uploaded your CSV you'll see an inferred schema, if you're using the example above you'll get 40 records, as well as an /Answer
& /Question
property, both of which are strings:

Dataset Synchronization
While this guide works off a simple CSV upload, for production use cases you'll most likely have a more complex data schema and our data sync API. AI Resources supports both methods of data ingestion, you can learn more about how that works here.
Building your Transformation Engine
Once you've got your data into AI Resources, you may want to tranfsorm or enrich your dataset. There are a bunch of different things you can do to Transform a dataset, see Dataset Transformations for additional examples.
For the purpose of this demo, we're going create a transformation that enriches our dataset with a set of questions that will help our AI agent with search accuracy.
A transformation is simply a pipeline of steps. Each step takes in data (a row in our csv) and returns data that is passed onto the next step. A step is either a call to a LLM, a simple python function or a call to another transformation you have already built in AI Studio.
Let's get started, navigate to Transformations and select New Transformation Engine:

Name your new Transformation Engine QuiqSilver knowledge engine, or something similar:

Next, select Create New Draft, which will take you into your Transformation view:

Creating a Transformation
Next, select Add New:

and create a new Transformation called enrich:

Creating Steps
Next, you'll want to select Add Step to create the first step within your transformation, click back over to the Configuration tab and select Add Bootstrapped Step.

In this step, we will generate related questions for a each Question and Answer pair in our dataset. Set the Type to Prompt AI, LLM to gpt-4o-mini, and identifier to generate_questions.
Manual Steps vs Bootstrapped Steps
A Manual Step should be used when you already have functions you'd like to use in the Code tab, a Bootstrapped Step will create the signatures of the function(s) for you:
This will bootstrap two functions:
- one to build a prompt and send the request to the LLM
- another to handle the completion returned from the LLM
Once you click save, you will be automatically navigated to the code editing panel and you should see code like this.

After reviewing the bootstrapped code, go ahead and modify it with something like this:
def build_generate_questions(llm, data):
instructions = f"""
Your job is to carefully review the following question-answer-pair and then generate a set of related questions.
<question-answer-pair>
{data['Question']}
{data['Answer']}
</question-answer-pair>
## RESPONSE
Generate the most likely short questions that may be addressed by the question-answer-pair.
Do your best to vary the questions, verbs, and adjectives.
Create 8 short questions.
Format the JSON results like this:
{{
"questions": [
"question_1",
"question_2",
"question...8"
]
}}
JSON: """
# set request to the request format for the LLM you are using
return {
"request": {
"messages": [{"role": "user", "content": instructions}],
"temperature": 0,
"max_tokens": 512,
"response_format": {
"type": "json_object"
}
}
}
def handle_generate_questions(llm, data, prompt, response, completion):
data['questions'] = quiq.json.loads(completion)['questions']
return [data]
Testing your step
Let's test our step:
- First, ensure you've saved your changes before testing using the save button in the top right.
- Next, ensure you've selected the correct Dataset and Transformation for testing:

Select the Test button to run your Transformation. you should see your step and the transformed documents.

A sample help statement, that was added to the Question and Answer CSV
In addition to seeing the questions that were added, you can expand the Debug Info section to see the prompt sent and completion returned from the LLM:

Advanced Configuration
You can use the Advanced Configuration button next to the Test button to modify how many documents you test, as well as what document you start your test on:
Depending on your use case and data, you can add additional steps to prepare your dataset for use in your AI agent. See Dataset Transformations for common use cases.
Creating a Search Key
Now that your data is enriched, we'll want to add a field (column) that will be searched by your AI agent. For the lesson we'll call this column search_key
, but you could call it embedding_text or any other name you choose. You'll want to join together all the semantically relevant text into a single field that will be embedded and searched by your AI agent. Your transformation steps normally one of two objectives:
- Help your AI agent find the right data
- Help your AI agent use that data in prompts
To create our search_key
, go to code section and add this function.
def create_search_key(data):
parts = data['questions']
parts.append(data['Question'])
parts.append(data['Answer'])
data['search_key'] = '\n'.join(parts)
return [data]
Go to the configuration tab and add a new step. Choose a type of Call Function and select create_search_key
function.

For each of our steps, select Add Description and update them like so:

Save and Test your transformation. you should results that look like this:
Using your Transformation
Now that we've run through our transformation step and done some testing, we can go ahead and publish our transformation using the publish button in the upper right:

Run Transformation
Next, navigate back to your initial dataset and select the Run Transformation option from the Actions Menu:

Now, select your Transformation. You can use the same Namespace you created earlier, and give your soon to be created dataset a new name that distinguishes it from what you started with, like quiqsilver-bikes-faqs-enriched
:

Once you're transformation is completed, you can view your new Dataset, take note that it now includes the properties added during our transformation step:

Creating an Index
Now that we've got our newly transformed dataset available, we'll need to create an embedding and an index for it. Go ahead and select the Add Index Button.
Next select your Embedding Model (the model used to search, the default selection works great for our purposes), and the Embedding Property (the property an AI Agent will search against) , in our case we'll use our the search_key
which we just created for this purpose:

Filter Properties
Depending on your dataset it may be useful to filter a given index based on a specific property, maybe you have knowledge base articles for customers and bicycle shop owners, and wanted to create separate indexes for each, you could do that by utilizing a property that was part of your initial dataset, or was added during the transformation process.
Once that's done, you'll see your newly created Index:

Multiple Indexes
You can create multiple indexes for an individual dataset, for example if you're working with a product catalog you may want to have different datasets for different price points, or for different categories of products.
Creating a Search Resource
In order for an Index to be usable by an AI Agent, it needs to be associated with a Search Resource. Navigate over to the Search Resources section and create a new Search Resource:
Next, give your Search Resource a name, and select the Dataset and Index you've created:

Nice work! You've now created your first Search Resource with your newly transformed Dataset. You can ask questions of your Search Resource to see what articles get returned, and you can click into each result to see more details:

Summary
Datasets can be uploaded to AI Resources manually, or they can be synced via API. Datasets are the core building blocks that your AI Agents will use to generate answers, recommend products, and more.
Transformations enable you to modify your datasets to make them maximally usable for your AI Agent, all while keeping them in sync with the original source. Some transformation examples include:
- Removing unnecessary information from a dataset, like a phone number or social media handle from a knowledge base article
- Stripping out unwanted JSON
- Creating a topic for each article for better classification
- Creating related questions for better search results
You can use multiple steps within each transformation, and transformation engines can contain multiple transformations.
Indexes enable you to search your dataset via a property, and filter down based on properties as well.
Search Resources enable you to use your Indexes in your AI Agents.
What's Next
Next, you'll need to integrate your newly created Search Resource into your AI Agent, you can refer to the Building a Simple Retrieval Augmented Generation Flow guide for help getting started with.
References
Code Samples
Below you'll find all of the code used in this transformation for easy reference:
def build_generate_questions(llm, data):
instructions = f"""
Your job is to carefully review the following question-answer-pair and then generate a set of related questions.
<question-answer-pair>
{data['Question']}
{data['Answer']}
</question-answer-pair>
## RESPONSE
Generate the most likely short questions that may be addressed by the question-answer-pair.
Do your best to vary the questions, verbs, and adjectives.
Create 8 short questions.
Format the JSON results like this:
{{
"questions": [
"question_1",
"question_2",
"question...6"
]
}}
JSON: """
# set request to the request format for the LLM you are using
return {
"request": {
"messages": [{"role": "user", "content": instructions}],
"temperature": 0,
"max_tokens": 512,
"response_format": {
"type": "json_object"
}
}
}
def handle_generate_questions(llm, data, prompt, response, completion):
data['questions'] = quiq.json.loads(completion)['questions']
return [data]
def create_search_key(data):
parts = data['questions']
parts.append(data['Question'])
parts.append(data['Answer'])
data['search_key'] = '\n'.join(parts)
return [data]
Sample Artilces
If for any reason you're unable to access the sample CSV provided above, you can copy the content in table format here:
Question | Answer |
---|---|
What are your store hours? | QuiqSilver Bikes welcomes customers seven days a week with convenient hours to serve both commuters and weekend warriors. We're open Monday through Friday from 9:00 AM to 7:00 PM, Saturday from 8:00 AM to 6:00 PM, and Sunday from 10:00 AM to 5:00 PM. Holiday hours may vary seasonally. |
Do you offer bike repairs? | Our certified technicians provide comprehensive repair services including tune-ups, brake adjustments, gear indexing, wheel truing, and complete overhauls. We use high-quality replacement parts and offer same-day service for minor repairs. All work comes with a 30-day satisfaction guarantee on labor. |
What brands do you carry? | QuiqSilver Bikes proudly carries premium brands including Trek, Specialized, Giant, Cannondale, and our exclusive QuiqSilver line of custom bikes. We carefully select our inventory to provide options for every riding style and budget, from entry-level commuters to professional-grade racing bikes. |
How long does a basic tune-up take? | Standard tune-up services typically require 24-48 hours to complete, depending on current shop workload and parts availability. We offer expedited service options for urgent repairs and maintain a real-time status tracking system to keep you informed throughout the process. |
Do you offer bike financing? | Make your dream bike a reality with our flexible financing options. We partner with Affirm and offer our store credit card with 0% interest for 12 months on purchases over $500. Additional promotional financing is available during seasonal sales events. |
What's your return policy? | Customers can return new, unused bikes within 30 days with the original receipt and all packaging materials. Accessories and components can be returned within 14 days. All returns must be in original condition with tags attached. Store credit or exchanges are available beyond these periods. |
Do you price match? | We're committed to competitive pricing and will match any advertised price on identical new bikes from authorized local dealers within 25 miles of our store. Price matching requires current advertisement or website verification and excludes closeout or clearance items. |
How do I choose the right bike size? | Our professional fitting service combines digital measurements with expert analysis to determine your ideal bike size. We evaluate your height, inseam, flexibility, riding style, and comfort preferences. This comprehensive approach ensures optimal performance and comfort for your specific needs. |
Do you offer bike rentals? | Experience different bike styles through our rental program, featuring mountain bikes, road bikes, and city cruisers. Daily and weekly rates available with damage protection options. Reservations recommended, especially during peak season. All rentals include helmets and basic accessories. |
What's included in a basic tune-up? | Our basic tune-up service covers essential maintenance including brake adjustment, gear indexing, tire pressure optimization, chain cleaning and lubrication, bearing checks, and comprehensive safety inspection. We also provide detailed recommendations for any additional services needed. |
Do you offer assembly services? | Professional assembly is complimentary with any bike purchase from QuiqSilver Bikes. Our certified technicians ensure proper component installation, safety checks, and basic fit adjustments. We also offer assembly services for bikes purchased elsewhere at competitive rates. |
What's your warranty policy? | New bikes include manufacturer warranties ranging from 1-5 years, covering defects in materials and workmanship. We offer extended warranty options for additional protection. Our staff will explain coverage details and help register your warranty at purchase. |
Do you buy used bikes? | QuiqSilver Bikes accepts trade-ins and purchases quality used bikes after thorough inspection. Our experienced technicians evaluate condition, components, and market value to provide fair offers. Trade-in value can be applied to new purchases or received as store credit. |
How often should I service my bike? | Regular maintenance intervals depend on riding frequency and conditions. We recommend basic service every 3-6 months for regular riders, with comprehensive annual tune-ups. High-mileage riders should consider more frequent maintenance schedules based on usage patterns. |
Do you offer group rides? | Join our vibrant cycling community through weekly organized rides for all skill levels. Rides include beginner-friendly social cruises, intermediate fitness rides, and advanced training groups. Check our events calendar for schedules, routes, and special themed rides. |
What cycling accessories do you carry? | Our comprehensive accessories department stocks essential gear including helmets, lights, locks, pumps, tools, and cycling-specific clothing. We carry leading brands and offer expert advice on selecting appropriate accessories for your riding style and needs. |
Do you offer bike insurance? | Through our partnership with Velosurance, we offer comprehensive bicycle insurance covering theft, damage, and liability. Coverage options can be customized based on bike value and riding habits. Our staff can help you compare plans and initiate coverage. |
Can I test ride bikes before buying? | We encourage test rides to ensure the perfect match between rider and bicycle. Our supervised test ride program requires valid ID and allows you to experience the bike on various terrain types around our store. Multiple bikes can be tested for comparison. |
Do you ship bikes? | We offer professional shipping services throughout the continental US. Bikes are carefully packed by our technicians and shipped partially assembled for protection. Full assembly instructions are included, and we provide video chat support for assembly questions. |
What payment methods do you accept? | Shop conveniently with multiple payment options including all major credit cards, debit cards, cash, PayPal, and Apple Pay. We also offer flexible financing solutions and can process payment through HSA/FSA accounts for eligible items. |
Do you offer military discounts? | Active duty military, veterans, and their immediate family members receive a 10% discount on regular-priced items with valid identification. This discount applies to both merchandise and services, excluding special orders and already-discounted items. |
How do I maintain my bike chain? | Proper chain maintenance extends drivetrain life and improves performance. Clean and lubricate your chain every 100-200 miles, depending on riding conditions. We offer free maintenance demonstrations and recommend specific products for your riding environment. |
Do you offer winter storage? | Protect your bike during the off-season with our secure storage service. The $100 seasonal rate includes climate-controlled storage, basic maintenance check, and cleaning. We also perform necessary winterization services before storage to prevent deterioration. |
What's your bike fitting process? | Our comprehensive fitting process combines physical measurements, flexibility assessment, and riding style evaluation. Sessions typically last 30-60 minutes and include adjustments to ensure optimal comfort and performance. We use digital tools for precise measurements. |
Do you sell electric bikes? | Explore our selection of premium electric bikes featuring various power assistance levels and ranges. We carry models suitable for commuting, recreation, and cargo transport. Our staff can explain the different motor systems and help you choose the right e-bike. |
How do I lock my bike properly? | Effective bike security combines proper locking technique with quality equipment. We recommend using a U-lock through the frame and rear wheel, plus a cable lock for the front wheel. Our staff can demonstrate proper locking methods and recommend secure lock combinations. |
Do you offer gift cards? | QuiqSilver Bikes gift cards are available in any denomination and never expire. They can be used for products, services, or rentals. Purchase in-store or online, with options for physical or digital delivery. Perfect for birthdays, holidays, or any special occasion. |
What's your crash replacement policy? | Our crash replacement program offers significant discounts on replacement parts and frames damaged within the first year of purchase. Documentation of the incident is required, and our staff will assist with warranty claims and insurance paperwork if applicable. |
Do you have a rewards program? | The QSB Rewards program lets members earn points on every purchase, including services and repairs. Points can be redeemed for store credit, exclusive discounts, and early access to sales. Membership is free and includes special birthday rewards. |
Can I special order specific bikes? | We can special order any bike from our supported manufacturers not currently in stock. Orders typically arrive within 2-4 weeks, and we require a deposit. Our staff will keep you updated on order status and notify you immediately upon arrival. |
Do you offer kids' bikes? | Our children's bike selection includes models for all ages and skill levels. We offer a trade-in program as children grow, providing credit toward larger bikes. Each purchase includes sizing adjustment and basic riding instruction to ensure safety. |
What's included in a professional bike fit? | Professional fitting services include comprehensive measurements, cleat positioning, saddle height and position adjustment, reach optimization, and pressure mapping analysis. We also provide follow-up adjustments within the first month after fitting. |
Do you offer maintenance classes? | Monthly maintenance workshops cover essential bike care topics including basic repairs, cleaning techniques, and safety checks. Classes are hands-on with limited group sizes to ensure individual attention. Registration includes a basic tool kit and manual. |
What tools should every cyclist have? | Essential tools for cyclists include a quality multi-tool, tire levers, spare tubes, mini-pump, and basic wrench set. We offer pre-assembled tool kits and can help customize a selection based on your bike's specific requirements and your mechanical expertise. |
How do I choose the right saddle? | Finding the perfect saddle involves considering riding style, anatomy, and flexibility. We offer test rides with different saddle models and include professional fitting with purchase. All saddles come with a 30-day comfort guarantee for peace of mind. |
Do you sell bike racks? | Our rack selection includes vehicle-mounted options, home storage solutions, and garage organizing systems. We can help determine the best rack for your specific needs and provide installation guidance. All racks come with manufacturer warranties and installation instructions. |
What's your tire repair policy? | Tire repairs cost $15 for standard patches or tube replacements, with free service if you purchased the tire from us within the last year. We stock common tire sizes and tubes, ensuring quick repairs in most cases. |
Do you offer bike registration? | Protect your investment with our free bike registration service. We record serial numbers and bike details in local and national databases, providing documentation for insurance and recovery purposes. Photos and detailed descriptions are included in the registration. |
What's your rain check policy? | Rain checks are issued for advertised items that are temporarily out of stock. Valid for 30 days, they guarantee the sale price when items become available. We maintain a waiting list system and will contact you when your item arrives. |
How do I prepare my bike for winter? | Our winterization service includes rust prevention treatment, weather-appropriate tire installation, cable lubrication, and comprehensive weatherproofing. We also provide guidance on winter storage and maintenance tips for harsh weather conditions. Professional service recommended annually. |
Updated 14 days ago