SAGE Tool Use SIAS (Sample-Importance-Aware Selection)
Tool selection algorithm using sample-importance-aware selection for agent training and tool curation
🎯 Overview
sage-agentic-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-agentic-tooluse-sias
# Development installation
pip install isage-agentic-tooluse-sias[dev]
🚀 Quick Start
Continual Learning
from sage_sias import OnlineContinualLearner, SIASSample
# Create continual learner
learner = OnlineContinualLearner(
buffer_size=1000,
replay_ratio=0.3,
)
# Add samples
new_samples = [
SIASSample(sample_id="s1", text="tool call trace A"),
SIASSample(sample_id="s2", text="tool call trace B"),
]
training_batch = learner.update_buffer(new_samples)
# Inspect replay buffer
important_samples = learner.buffer_snapshot()
Coreset Selection
from sage_sias import CoresetSelector
# Create coreset selector
selector = CoresetSelector(
strategy="hybrid",
)
# Select representative samples
coreset = selector.select(samples=dataset, target_size=100)
📚 Key Components
1. Continual Learner (continual_learner.py)
Manages sample selection for continual learning:
- Buffer management with importance-based eviction
- Multiple selection strategies (loss_topk, diversity, hybrid, random)
- Support for experience replay
2. Coreset Selector (coreset_selector.py)
Selects representative subsets:
- Loss/diversity/hybrid/random selection
- Diversity-aware sampling
- Importance scoring
- Support for large-scale datasets
3. Core Types (core_types.py)
Common data types and protocols:
- Sample representation
- Sample protocol
- Selection summary
🔧 Architecture
sage_sias/
├── continual_learner.py # Continual learning with buffer management
├── coreset_selector.py # Coreset selection algorithms
├── core_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 OnlineContinualLearner, CoresetSelector, SIASSample
learner = OnlineContinualLearner(buffer_size=2048, replay_ratio=0.25)
selector = CoresetSelector(strategy="hybrid")
samples = [
SIASSample(sample_id="a", text="query weather"),
SIASSample(sample_id="b", text="query calendar"),
]
selected = selector.select(samples=samples, target_size=1)
batch = learner.update_buffer(selected)
📖 Documentation
- Repository: https://github.com/intellistream/sage-agentic-tooluse-sias
- SAGE Documentation: https://intellistream.github.io/SAGE-Pub/
- Issues: https://github.com/intellistream/sage-agentic-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-agentic-tooluse-sias 0.1.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| isage_agentic_tooluse_sias-0.1.1.6.tar.gz | 13.1 kB | Without provenance | Details for isage_agentic_tooluse_sias-0.1.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| isage_agentic_tooluse_sias-0.1.1.6-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for isage_agentic_tooluse_sias-0.1.1.6-py2.py3-none-any.whl |
Total release size: 24.2 kB
Release files / isage_agentic_tooluse_sias-0.1.1.6.tar.gz
| Download URL | isage_agentic_tooluse_sias-0.1.1.6.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5972d883e64e36d11d22e2a2b5a61ee21ee233b7188f6e0bc673c97095ab95b1
|
|
BLAKE2b-256 checksum How to use checksums |
ddaabbe392a5cf39eac30f6c807c7e6040778cf7e7750016fa6a020411cfac34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / isage_agentic_tooluse_sias-0.1.1.6-py2.py3-none-any.whl
| Download URL | isage_agentic_tooluse_sias-0.1.1.6-py2.py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
14a61176afa3d253a814e8302c9ebe541f063317cc385be970f4d5e9b7cd458c
|
|
BLAKE2b-256 checksum How to use checksums |
662ec912966f45a567e71519a2869532b7d3d24392a7bd7a824a50be36f3466d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for isage-agentic-tooluse-sias 0.1.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.