SAGE Tool Use SIAS - Sample-Importance-Aware Selection for tool selection and agent training
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file isage_agentic_tooluse_sias-0.1.1.4.tar.gz.
File metadata
- Download URL: isage_agentic_tooluse_sias-0.1.1.4.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9a028fb10ba2beb9b4c5ebb971bcb729f61a7789664ae4e8fd0700a1bc73782
|
|
| MD5 |
f2c7d0e93f850cb2a6168db4ee531b5c
|
|
| BLAKE2b-256 |
bf6fde96bfe491fca81e11d3b7a3062637d2302d041bf799621a0c9f6a5352eb
|
File details
Details for the file isage_agentic_tooluse_sias-0.1.1.4-py2.py3-none-any.whl.
File metadata
- Download URL: isage_agentic_tooluse_sias-0.1.1.4-py2.py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a40463d1ab2acb6e30fc28d8b3e601cbf2406858652b905f5df47e6bbfebb3ef
|
|
| MD5 |
c1999b8db6d4f33983b272b8cefa1fc0
|
|
| BLAKE2b-256 |
9dda6365c8b47264efe86c3640b03939b19863743b3bb310c2140d0543294e3a
|