Your task is to build an AI agent that can answer questions about cars using the provided dataset. The agent should be able to understand natural language queries and provide accurate responses based on the data in data/cars.csv.
The data/cars.csv file contains detailed information about various car models including:
- Make and Model information
- Engine specifications (type, fuel type, cylinders, size, horsepower, torque)
- Body details (type, doors, seats, dimensions, weight)
- Fuel economy (MPG ratings, range, tank capacity)
- Pricing (MSRP, invoice price)
- Electric vehicle specifications (where applicable)
Your agent should be able to:
-
Answer specific questions about car attributes
- Examples: "What's the horsepower of the 2020 Acura ILX?", "How much does a Honda Civic cost?", "What's the fuel type of the BMW X3?"
-
Compare vehicles across different attributes
- Examples: "Which has better fuel economy: Honda Civic or Toyota Camry?", "Compare the seating capacity of SUVs", "Which is more expensive: Acura MDX or BMW X5?"
-
Filter and search the dataset based on criteria
- Examples: "Show me all SUVs under $50,000", "Find all electric vehicles", "List cars with more than 300 horsepower"
-
Provide recommendations based on user preferences
- Examples: "What's the most fuel-efficient car in the dataset?", "Recommend a family car with good safety ratings", "What's the best value luxury sedan?"
- "What's the most expensive car in the dataset?"
- "Show me all electric vehicles"
- "Which Toyota models are available?"
- "What's the fuel economy of the BMW X5?"
- "Find cars with more than 400 horsepower"
- "Compare the Acura MDX and Honda Pilot"
- "What hybrid cars cost less than $35,000?"
- "Which car has the largest trunk space?"
- Implement fuzzy matching for car names
- Add support for complex queries (e.g., "Cars with more than 300 HP and AWD")
- Create a simple CLI or web interface
- Add data visualization capabilities
- Implement conversation memory/context
We've taken care of all the environment setup for you! The project is configured and ready to use. Here's what you need to do:
Install all dependencies using Python UV (a fast Python package installer):
uv syncThis will create a virtual environment and install all required packages including pandas for data manipulation and the OpenAI SDK for LLM functionality.
For LLM functionality, you'll use the OpenAI SDK which is already included in the project dependencies. I will provide you with a onetimesecret link to get your API key. Once you have it, set it as an environment variable:
export OPENAI_API_KEY="your-api-key-here"EXPLICITLY use the OpenAI Chat Completions API - do NOT use the responses API or any framework. You should make direct calls to the chat completions endpoint using the OpenAI SDK like this:
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(
model="gpt-4.1-mini",
messages=[
{"role": "system", "content": "You are a helpful assistant..."},
{"role": "user", "content": "Your query here"}
]
)The dataset is ready for you to explore. Start by examining the car data:
import pandas as pd
df = pd.read_csv('data/cars.csv')
print(df.head())
print(df.columns)
print(df.info())Now you're ready to implement your agent! The environment is fully set up and you can focus on building the AI agent functionality.
This assessment focuses on how you think and approach problems rather than achieving perfect results with this toy dataset. We want to see:
- Your problem-solving approach and thought process
- How you structure your code and handle data
- Your reasoning for design decisions
- How you handle edge cases and unexpected inputs
- Your ability to work with LLMs and data effectively
Remember: There's no single "correct" solution. We're interested in your methodology and reasoning.
- 1 hour live coding session where we'll discuss your approach and see you work through problems
- Follow-up time to complete and refine your solution after the interview
After the interview, you'll have time to complete your solution. Please submit:
- Private submission: Send a zip file of your complete solution via email
- Include all your code, any additional files, and a brief explanation of your approach
- Document any assumptions, trade-offs, or areas for improvement you identified
Good luck and have fun building!