AutoDiff-like tool for end-to-end AI agent training with general feedback
Top 53.4% on sourcepulse
Trace is a Python library for end-to-end generative optimization of AI systems, enabling training with diverse feedback types like rewards, natural language, or compiler errors. It generalizes back-propagation by capturing and propagating execution traces, allowing users to optimize Python code directly, similar to training neural networks.
How It Works
Trace captures computation traces using node
and bundle
primitives. node
wraps data that can be optimized, while @bundle
decorates Python functions for optimization. The OptoPrime
optimizer, along with others like TextGrad
and OPRO
, then updates parameters based on feedback, enabling optimization of complex AI agent behaviors and code generation.
Quick Start & Requirements
pip install trace-opt
or pip install trace-opt[autogen]
for AutoGen support.OAI_CONFIG_LIST
file.Highlighted Details
OptoPrime
(2-3x faster than TextGrad), TextGrad
, and OPRO
.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
Trace is a beta version for research purposes. LLM API performance can vary, and specific models (e.g., gpt-4o-2024-05-13
) may exhibit issues with structured output. Large graphs (>hundreds of operations) might pose challenges for OptoPrime
.
1 month ago
Inactive