SAGE Tool Use SIAS (Sample-Importance-Aware Selection)
Tool selection algorithm using sample-importance-aware selection for agent training and tool curation
🎯 Overview
sage-tooluse-sias provides Sample-Importance-Aware Selection algorithms specifically designed for:
- Tool Selection: Select important tools for agent use
- Agent Training: Select important trajectories for fine-tuning
- Continual Learning: Efficient sample selection for continual/lifelong learning
- Tool/Trajectory Curation: Curate representative samples for agent development
📦 Installation
# Basic installation
pip install isage-tooluse-sias
# With PyTorch support
pip install isage-tooluse-sias[torch]
# Development installation
pip install isage-tooluse-sias[dev]
🚀 Quick Start
Continual Learning
from sage_sias import ContinualLearner
# Create continual learner
learner = ContinualLearner(
buffer_size=1000,
selection_strategy="importance"
)
# Add samples
for data, label in stream:
learner.add_sample(data, label)
# Get selected samples
important_samples = learner.get_buffer()
Coreset Selection
from sage_sias import CoresetSelector
# Create coreset selector
selector = CoresetSelector(
target_size=100,
method="kmeans++"
)
# Select representative samples
coreset = selector.select(dataset, features)
📚 Key Components
1. Continual Learner (continual_learner.py)
Manages sample selection for continual learning:
- Buffer management with importance-based eviction
- Multiple selection strategies (random, importance, diversity)
- Support for experience replay
2. Coreset Selector (coreset_selector.py)
Selects representative subsets:
- K-means++ based selection
- Diversity-aware sampling
- Importance scoring
- Support for large-scale datasets
3. Types (types.py)
Common data types and protocols:
- Sample representation
- Importance scoring interfaces
- Selection strategies
🔧 Architecture
sage_sias/
├── continual_learner.py # Continual learning with buffer management
├── coreset_selector.py # Coreset selection algorithms
├── types.py # Common types and protocols
└── __init__.py # Public API exports
🎓 Use Cases
- Agent Training: Select important trajectories for fine-tuning
- Data Pruning: Reduce dataset size while maintaining performance
- Active Learning: Query most informative samples
- Memory Management: Maintain representative samples in limited buffers
- Transfer Learning: Select relevant samples for adaptation
🔗 Integration with SAGE
This package is part of the SAGE ecosystem but can be used independently:
# Standalone usage
from sage_sias import ContinualLearner, CoresetSelector
# With SAGE agentic (optional)
from sage_agentic import AgentTrainer
from sage_sias import CoresetSelector
trainer = AgentTrainer()
selector = CoresetSelector(target_size=100)
important_trajectories = selector.select(all_trajectories)
trainer.train(important_trajectories)
📖 Documentation
- Repository: https://github.com/intellistream/sage-tooluse-sias
- SAGE Documentation: https://intellistream.github.io/SAGE-Pub/
- Issues: https://github.com/intellistream/sage-tooluse-sias/issues
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📄 License
MIT License - see LICENSE file for details.
🙏 Acknowledgments
Originally part of the SAGE framework, now maintained as an independent package for broader community use.
📧 Contact
- Team: IntelliStream Team
- Email: shuhao_zhang@hust.edu.cn
- GitHub: https://github.com/intellistream
Metadata
Release files for isage-tooluse-sias 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| isage_tooluse_sias-0.1.0.tar.gz | 11.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| isage_tooluse_sias-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.7 kB
Release files / isage_tooluse_sias-0.1.0.tar.gz
| Download URL | isage_tooluse_sias-0.1.0.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c16b424fe9dbce1ca7fdf42bd08d9531c1744be2f08513b48d4ce58b314f207
|
|
BLAKE2b-256 checksum How to use checksums |
d2e2463ec788471f04097c86daf91c2b2bb655b13794580364638e4402ad6b58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|
Release files / isage_tooluse_sias-0.1.0-py3-none-any.whl
| Download URL | isage_tooluse_sias-0.1.0-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9428bbf87b9c95afbddb9504b5e891a5c682522b1854894e1a07690be51e487b
|
|
BLAKE2b-256 checksum How to use checksums |
5712e084565d509c81edef03942913275891531f11f497698d555fa125e9bc45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.11
|