Feature Suggestion Agent
The Feature Suggestion Agent is an intelligent agent that uses LLMs (Large Language Models) to automatically generate and suggest features for machine learning tasks. It can produce feature definitions, formulas, reasoning, and SQL queries for dataset transformation.
Features
- Accepts dataset metadata, target information, and modeling approach.
- Generates new feature suggestions using an LLM.
- Provides:
- Feature name (
title) - Columns used (
columns_involved) - Calculation logic (
formula_logic) - Reasoning for usefulness
- SQL to create the feature
- Aggregation/grouping info for window or group operations
- Feature name (
- Parses LLM responses into validated Pydantic models.
📦 Installation
Prerequisites
- Python 3.11+
- Git
- uv – A fast Python package and environment manager.
- For a quick setup on macOS/Linux, you can use:
curl -LsSf https://astral.sh/uv/install.sh | sh
- For a quick setup on macOS/Linux, you can use:
Setup
-
Clone the repository
git clone https://github.com/stepfnAI/feature_suggestion_agent.git cd feature_suggestion_agent/ git checkout main
-
Set up the virtual environment and install dependencies This command creates a
.venvfolder in the current directory and installs all required packages.uv sync --extra dev source .venv/bin/activate
-
Set up environment variables
# Optional: Configure LLM provider (default: openai) export LLM_PROVIDER="your_llm_provider" # Optional: Configure LLM model (default: gpt-4.1-mini) export LLM_MODEL="your_llm_model" # Required: Your LLM API key (Note: If LLM provider is opeani then 'export OPENAI_API_KEY', if it antropic 'export ANTROPIC_API_KEY', use this accordingly as per LLM provider ) export OPENAI_API_KEY="your_llm_api_key"
🛠️ Usage
Basic Usage
python examples/basic_usage.py
🧪 Testing
Run the test file:
pytest -v tests/test_agent.py
🏗️ Architecture
The Feature Suggestion Agent is built with a modular architecture
-
Core Components:
agent.py: Base agent implementationmodels.py: Data models and schemasconstants.py: promptsconfig.py: model configurations
-
Dependencies:
sfn-blueprint: Provides core framework functionalities and utilities for agent development.pydantic: Data validation
🤝 Contributing
📝 License
[Add your license information here]
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📧 Contact
Release files for feature-suggestion-agent 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| feature_suggestion_agent-0.1.9.tar.gz | 20.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| feature_suggestion_agent-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.7 kB
Release files / feature_suggestion_agent-0.1.9.tar.gz
| Download URL | feature_suggestion_agent-0.1.9.tar.gz |
|---|---|
| Size | 20.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
218be3e02ec0ec5a3c4b8c92240662550d43614498339a555e55d9d5cd21f96a
|
|
BLAKE2b-256 checksum How to use checksums |
1a0ff7988afecbf93b2daaa7d5077d84f6aa0d383f68b9971fdbc6d8218a7b28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|
Release files / feature_suggestion_agent-0.1.9-py3-none-any.whl
| Download URL | feature_suggestion_agent-0.1.9-py3-none-any.whl |
|---|---|
| Size | 19.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2c74c7cf0dcf4626597e4cd0ec8623341f1f302f52afbc48ace7b3d66ac857c4
|
|
BLAKE2b-256 checksum How to use checksums |
c6066e81cc2548dbfcce74ab45655af2aa7a3fc546e7dfc3363416e4dea157be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.11
|