Repository navigation
v0.1.2
Release v0.1.2: High-Quality Tool-Use Data Synthesis Framework π
We are thrilled to introduce Sloop, an advanced synthetic data generation framework designed to produce high-quality, reasoning-intensive tool-use datasets for training Large Language Models (LLMs).
Unlike traditional random generation methods, Sloop introduces a Graph-Based Intelligent Synthesis Strategy to ensure logical coherence and domain relevance in multi-turn dialogues.
π§ Core Mechanism: Intelligent Tool Chain Generation
Sloop abandons completely random tool combinations in favor of a sophisticated graph-theoretic approach to generate realistic user tasks.
1. Automated Dependency Inference (Graph Construction) π
Sloop automatically analyzes your tool definitions (OpenAI schema) to build a massive Tool Dependency Graph.
- Logic: It infers dependencies by matching "upstream outputs" with "downstream inputs."
- Mechanism: If the required parameter of Tool B (e.g.,
dish_id) appears in the description of Tool A (e.g., "returns a list of dishes withdish_id"), Sloop establishes a directed edgeA -> B. - Result: This creates a structured map of how tools can naturally interact, ensuring that generated workflows are technically viable.
2. Domain-Sticky Sampling (Sticky Random Walk) π§
To generate multi-step tasks, Sloop employs a "Sticky Random Walk" algorithm on the dependency graph.
- Domain Stickiness: The algorithm prefers staying within the same or related domains (e.g.,
Travel->Hotel->Payment) rather than making illogical jumps (e.g.,Weather->Stock Market). - Scoring System:
- Strong Relation (1.0): Tools within the same category.
- Weak Relation (0.7): Tools in logically related categories (e.g., Music & Audio).
- No Relation (0.3): Unrelated domains.
- Probabilistic Selection: The system selects the next tool based on these scores (80% probability for the best logical fit, 20% for diversity), simulating real-world user behavior that is purposeful yet occasionally non-linear.
3. PDA-Driven Execution π€
Once a logical tool chain is sampled, Sloop's Pushdown Automaton (PDA) engine orchestrates a multi-agent simulation (User, Assistant, Service) to generate the actual dialogue, complete with Chain-of-Thought (CoT) reasoning and stateful environment updates.
β¨ Key Features
- π¦ Training-Ready: Outputs data in a flat JSON format ready for SFT (Supervised Fine-Tuning) or RLHF.
- π§ Stateful Simulation: Maintains a virtual environment state to prevent hallucinations and ensure data consistency.
- β‘ Scalable: Capable of handling thousands of tool definitions efficiently.
Build the next generation of reasoning-capable Agent models with Sloop.