Trace2

Examples

Real-world examples of building AI systems with Trace2

Examples

Learn Trace2 through complete, real-world examples.

Browse examples organized by complexity and use case.

What You'll Find

Each example includes:

  • Complete Code: Fully runnable examples you can copy and use
  • Step-by-Step Explanation: Detailed walkthrough of each component
  • Before/After Comparison: See the optimization results
  • Use Case Context: When and why to use this pattern

Examples by Category

🔧 Code Optimization

Learn how Trace2 can optimize code to meet specifications:

  • Function optimization with test cases
  • Algorithm improvement
  • Code generation and refinement

🤖 AI Agents

Build self-improving AI agents:

  • Sales agents that learn from feedback
  • Customer service bots that adapt
  • Task-oriented assistants

🎮 Interactive Applications

Apply Trace to games and interactive systems:

  • Battleship game strategy optimization
  • Game-playing agents

🤝 Multi-Agent Systems

Coordinate multiple agents:

  • Agent collaboration
  • Multi-agent task decomposition
  • Distributed optimization

📝 NLP Tasks

Natural language processing applications:

  • Prompt optimization
  • Text generation improvement
  • Question answering systems

🦾 Robotics

Control systems and robotics:

  • Robot arm control
  • Task planning
  • Simulation environments

Coming from the Paper?

The examples in our NeurIPS 2024 paper are available:

  • BigBench-Hard tasks
  • Metaworld robotics
  • VirtualHome multi-agent
  • Traffic simulation

Check the main Trace2 repository for full implementations.

Contributing Examples

Have a cool example using Trace? We'd love to feature it!

  1. Create a complete, runnable example
  2. Add clear explanations
  3. Submit a PR to the documentation repository

Next Steps

Need Help?