Skip to main content

GenAI-powered agent-based tool for automated data science workflows

Project description

AutoDS Copilot

๐Ÿค– A GenAI-powered agent-based tool for automated data science workflows

AutoDS Copilot is an intelligent Python package that automates exploratory data analysis, feature engineering, and machine learning model development through natural language prompts. Simply describe what you want to achieve, and let the AI agent handle the implementation details.

๐Ÿš€ Key Features

  • Natural Language Interface: Interact with your data using simple prompts like "Build a regression model with target = price"
  • Automated EDA: Comprehensive exploratory data analysis with visualizations and insights
  • Smart Feature Engineering: Automatic categorical encoding (OneHot, Ordinal, Target, etc.)
  • ML Model Selection: Dynamically selects and trains suitable models for classification or regression
  • Safe Code Execution: Internal Python interpreter with security safeguards
  • Modular Architecture: Clean, extensible design for easy customization
  • Multiple Data Sources: Support for CSV files and pandas DataFrames
  • Rich Outputs: Evaluation metrics, visualizations, and model interpretability

๐Ÿ“ฆ Installation

pip install autods-copilot

๐Ÿ”ง Quick Start

from autods_copilot import AutoDSCopilotAgent

# Initialize the agent
agent = AutoDSCopilotAgent()

# Load your dataset
agent.load_csv("data/house_prices.csv")

# Let the AI handle the rest!
result = agent.run("Perform EDA and build a regression model to predict house prices")

# Get insights and visualizations
print(result.summary)
result.show_plots()

Advanced Usage

# More specific prompts
agent.run("Create correlation heatmap and identify top 5 features for price prediction")
agent.run("Apply one-hot encoding to categorical variables and train Random Forest")
agent.run("Compare performance of Linear Regression vs XGBoost vs Neural Network")

# Direct data loading
import pandas as pd
df = pd.read_csv("your_data.csv")
agent.load_dataframe(df)
agent.run("Build classification model for target column 'category'")

With OpenAI Integration (Enhanced)

import os
from autods_copilot import AutoDSCopilotAgent

# Set your OpenAI API key
agent = AutoDSCopilotAgent(
    openai_api_key=os.getenv('OPENAI_API_KEY'),
    llm_model="gpt-4o"  # or "gpt-4o-mini" for cost-effective option
)

# Load data
agent.load_csv("titanic.csv")

# Ask sophisticated natural language questions
result = agent.run("""
    Analyze the Titanic dataset to understand survival patterns.
    Focus on how passenger class, age, and gender influenced survival rates.
    Create visualizations and build a predictive model.
""")

## ๐Ÿ“ Package Structure

autods_copilot/ โ”œโ”€โ”€ init.py # Package initialization โ”œโ”€โ”€ agent/ โ”‚ โ”œโ”€โ”€ init.py โ”‚ โ”œโ”€โ”€ copilot_agent.py # Main agent orchestrator โ”‚ โ””โ”€โ”€ response_handler.py # Response processing โ”œโ”€โ”€ interpreter/ โ”‚ โ”œโ”€โ”€ init.py โ”‚ โ”œโ”€โ”€ python_executor.py # Safe code execution engine โ”‚ โ””โ”€โ”€ security.py # Security validators โ”œโ”€โ”€ modules/ โ”‚ โ”œโ”€โ”€ init.py โ”‚ โ”œโ”€โ”€ eda/ โ”‚ โ”‚ โ”œโ”€โ”€ init.py โ”‚ โ”‚ โ”œโ”€โ”€ analyzer.py # EDA analysis โ”‚ โ”‚ โ””โ”€โ”€ visualizer.py # Plot generation โ”‚ โ”œโ”€โ”€ encoding/ โ”‚ โ”‚ โ”œโ”€โ”€ init.py โ”‚ โ”‚ โ”œโ”€โ”€ categorical.py # Encoding strategies โ”‚ โ”‚ โ””โ”€โ”€ numerical.py # Numerical preprocessing โ”‚ โ””โ”€โ”€ modeling/ โ”‚ โ”œโ”€โ”€ init.py โ”‚ โ”œโ”€โ”€ classifier.py # Classification models โ”‚ โ”œโ”€โ”€ regressor.py # Regression models โ”‚ โ””โ”€โ”€ evaluator.py # Model evaluation โ”œโ”€โ”€ prompts/ โ”‚ โ”œโ”€โ”€ init.py โ”‚ โ”œโ”€โ”€ templates/ โ”‚ โ”‚ โ”œโ”€โ”€ eda_prompts.py # EDA prompt templates โ”‚ โ”‚ โ”œโ”€โ”€ encoding_prompts.py # Encoding prompts โ”‚ โ”‚ โ””โ”€โ”€ modeling_prompts.py # ML prompts โ”‚ โ””โ”€โ”€ prompt_manager.py # Prompt orchestration โ”œโ”€โ”€ utils/ โ”‚ โ”œโ”€โ”€ init.py โ”‚ โ”œโ”€โ”€ config.py # Configuration management โ”‚ โ”œโ”€โ”€ logger.py # Logging utilities โ”‚ โ””โ”€โ”€ validators.py # Input validation โ””โ”€โ”€ config/ โ”œโ”€โ”€ default_config.yaml # Default settings โ””โ”€โ”€ model_configs.yaml # ML model parameters


## ๐ŸŽฏ Use Cases

- **Data Scientists**: Rapid prototyping and baseline model development
- **Business Analysts**: Quick insights from data without coding
- **ML Engineers**: Automated feature engineering pipelines
- **Students**: Learning data science through AI guidance
- **Researchers**: Fast experimental setup and comparison

## ๐Ÿ›ฃ๏ธ Roadmap

### Phase 1: Core Foundation โœ…
- [x] Basic agent architecture
- [x] Safe code execution engine
- [x] Modular EDA capabilities
- [x] Simple encoding strategies

### Phase 2: Enhanced Intelligence ๐Ÿšง
- [ ] Advanced prompt engineering
- [ ] Context-aware model selection
- [ ] Automated hyperparameter tuning
- [ ] Multi-step workflow planning

### Phase 3: LLM Integration ๐Ÿ“‹
- [ ] OpenAI GPT-4 adapter
- [ ] Anthropic Claude support
- [ ] Local LLM compatibility (Ollama)
- [ ] Custom fine-tuned models

### Phase 4: Advanced Features ๐Ÿ“‹
- [ ] Time series analysis
- [ ] Deep learning models
- [ ] AutoML integration
- [ ] Model deployment helpers
- [ ] Interactive dashboards

## ๐Ÿค Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

```bash
# Development setup
git clone https://github.com/your-org/autods-copilot.git
cd autods-copilot
pip install -e ".[dev]"
pytest tests/

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Built with โค๏ธ for the data science community
  • Inspired by the need for accessible AI-powered analytics
  • Special thanks to all contributors and beta testers

Ready to revolutionize your data science workflow? Install AutoDS Copilot today!

PyPI version Python 3.8+ License: MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autods_copilot-0.1.0.tar.gz (50.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autods_copilot-0.1.0-py3-none-any.whl (62.8 kB view details)

Uploaded Python 3

File details

Details for the file autods_copilot-0.1.0.tar.gz.

File metadata

  • Download URL: autods_copilot-0.1.0.tar.gz
  • Upload date:
  • Size: 50.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for autods_copilot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 027deadd86d7f7a1fd68f3477afa1182bf5c167b38725b49c5674c14d8c04d97
MD5 6f378c615e03807718629c5f88678e62
BLAKE2b-256 4145fda69cbfa0ff9c3705016231f20133b74c11ea7caf8452e0cffc96c67575

See more details on using hashes here.

File details

Details for the file autods_copilot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: autods_copilot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 62.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.0

File hashes

Hashes for autods_copilot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c08e416742faffa3384b797c589e43ab34863715563673632c98334e7d4919d
MD5 ef4b2f77049a74fd4964ea04a83b9f6b
BLAKE2b-256 cef812f211c8f240bd5a2b8d27ca8cc281044fd720e8e290627e32e7f4d8cf86

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page