AIDE (Artificial Intelligence Development Environment) stands out as an innovative LLM agent that generates solutions for machine learning tasks using natural language descriptions. This powerful tool has acquired a significant reputation, as shown by its performance in over 60 Kaggle data science competitions, surpassing over 50% of competitors. In this guide, we’ll walk you through how to set up and run AIDE, make the most of its features, and troubleshoot common issues.
Setup
Before diving into the world of AIDE, ensure that you have Python 3.10 installed. Here’s how you can set it up:
- Open your terminal and run the following command:
pip install -U aideml
export OPENAI_API_KEY=your API key
or
export ANTHROPIC_API_KEY=your API key
Running AIDE via the Command Line
To run AIDE from the command line, follow these steps:
- Use the following command format:
aide data_dir=path to your data directory goal=describe the agents goal for your task eval=(optional) describe the evaluation metric the agent should use
aide data_dir=example_tasks/house_prices goal=Predict the sales price for each house eval=Use the RMSE metric between the logarithm of the predicted and observed values
- data_dir (required): Directory containing all relevant data (.csv files, images, etc.).
- goal: Describe what the model should predict.
- eval: Define the evaluation metric (e.g., accuracy, F1, etc.).
Understanding AIDE’s Processes: An Analogy
Think of AIDE as a master chef attempting to create the perfect dish. The chef (AIDE) starts with a basic recipe (initial code drafts) and continuously tastes (evaluates) the dish to see what works and what doesn’t. The chef makes adjustments based on feedback, refining the recipe iteratively until they arrive at the best possible version.
Just like a chef constantly tweaks their dish by adjusting ingredients and cooking times, AIDE improves its code, iterating through various drafts and selecting the optimal solution that meets the task requirements.
Advanced Usage
For users seeking to customize AIDE’s behavior, consider utilizing these options:
- agent.code.model=… – Specify the model for coding (default is gpt-4-turbo).
- agent.steps=… – Set the number of improvement iterations to run (default is 20).
- agent.search.num_drafts=… – Adjust the number of initial drafts (default is 5).
Refer to the config.yaml file for additional settings.
Using AIDE in Python
Incorporating AIDE into your Python script is seamless. After following the setup steps, create an AIDE experiment as follows:
import aide
exp = aide.Experiment(
data_dir='example_tasks/bitcoin_price', # replace with your directory
goal='Build a timeseries forecasting model for bitcoin close price.', # your goal description
eval='RMSLE' # your evaluation metric
)
best_solution = exp.run(steps=10)
print(f'Best solution has validation metric: {best_solution.valid_metric}')
print(f'Best solution code: {best_solution.code}')
Troubleshooting
If you’re facing any issues while using AIDE, here are some common troubleshooting steps:
- Ensure that you have Python 3.10 properly installed.
- Verify that your API keys are correctly set and active.
- Check that you provide the correct path to your data directory.
- If you encounter problems with generating the solution, consider adjusting the number of drafts or steps used in the task.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

