Skip to main content

AI-powered target variable creation and synthesis agent

Project description

Target Synthesis Agent

An intelligent AI-powered agent for generating and synthesizing target variables for machine learning tasks. This tool analyzes data characteristics and business context to create optimal target variables for various ML applications.

🚀 Features

  • AI-Powered Analysis: Leverages advanced LLM models to analyze data and business context
  • Multiple Data Sources: Works with both SQL databases and pandas DataFrames
  • Customizable Workflows: Supports various ML approaches and synthesis strategies
  • Comprehensive Testing: Includes a complete test suite for reliability
  • Extensible Architecture: Easy to extend with custom components and integrations

📦 Installation

Prerequisites

  • Python 3.10+
  • Git
  • uv package manager (recommended)

Setup

  1. Clone the repository

    git clone https://github.com/stepfnAI/target_synthesis_agent.git
    cd target_synthesis_agent/
    git checkout review
    
  2. Set up the virtual environment and install dependencies

    uv venv --python=3.10 venv
    source venv/bin/activate
    uv pip install -e ".[dev]"
    
  3. Clone and install the blueprint dependency

    cd ..
    git clone https://github.com/stepfnAI/sfn_blueprint.git
    cd sfn_blueprint
    git switch dev
    uv pip install -e .
    cd ../target_synthesis_agent
    
  4. Set up environment variables

    # Optional: Configure LLM provider (default: openai)
    export LLM_PROVIDER="your_llm_provider"
    
    # Optional: Configure LLM model (default: gpt-4)
    export LLM_MODEL="your_llm_model"
    
    # Required: Your LLM API key
    export LLM_API_KEY="your_llm_api_key"
    

🛠️ Usage

Basic SQL Usage

python examples/sql_basic_usage.py

🧪 Testing

Run the complete test suite:

pytest test/ -s

Or run individual test files:

pytest test/conftest.py -s
pytest test/test_agent.py -s
pytest test/test_sql_agent.py -s
pytest test/test_utils.py -s

🏗️ Architecture

The Target Synthesis Agent is built with a modular architecture:

  • Core Components:

    • sql_agent.py: Main SQL-based implementation
    • agent.py: Base agent implementation
    • models.py: Data models and schemas
    • utils.py: Utility functions and helpers
    • constants.py: Configuration and prompts
  • Dependencies:

    • sfn-blueprint: Core framework and utilities
    • pandas: Data manipulation
    • sqlalchemy: Database interactions
    • scikit-learn: ML utilities

🤝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

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

📧 Contact

For questions or support, please contact support@stepfunction.ai

🙏 Acknowledgments

  • Built with ❤️ by StepFunction AI
  • Uses sfn-blueprint for core functionality
  • Inspired by modern MLOps best practices

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

target_synthesis_agent-1.0.1.tar.gz (28.0 kB view details)

Uploaded Source

Built Distribution

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

target_synthesis_agent-1.0.1-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file target_synthesis_agent-1.0.1.tar.gz.

File metadata

  • Download URL: target_synthesis_agent-1.0.1.tar.gz
  • Upload date:
  • Size: 28.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for target_synthesis_agent-1.0.1.tar.gz
Algorithm Hash digest
SHA256 dac8bea17516315943297eaa771457d73b3c912bb89772b4c7ad3a5907904aed
MD5 5a59447d5d0efc5a9ea52e1ddd8a5304
BLAKE2b-256 48a1ca6ac6434645cf40a297e96a52e22f7fc38901293c1452b29ed96e127515

See more details on using hashes here.

File details

Details for the file target_synthesis_agent-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for target_synthesis_agent-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1685021111ab0a25c33d4c2a7fedb6d280e92586c7496e4158862099f387588f
MD5 6c263ae6b2252c06e55897aa2cdfe5ac
BLAKE2b-256 a54735684aaee4c561eb2d4d08e80e2c1aa82b5e31eca185c231b884eeda31b1

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