Skip to content

v0.2.0

Choose a tag to compare

@zhangdw156 zhangdw156 released this 02 Jan 03:31
· 18 commits to main since this release

πŸš€ Sloop v0.2.0: The "Intelligent Sampling" Update

Sloop v0.2.0 represents a major leap forward from random graph walks to intelligent, intent-driven dialogue generation. This release introduces a RAG-Enhanced Sampling Engine that combines the explicit structure of tool graphs with the semantic power of vector retrieval, orchestrated by an LLM-based decision agent.

✨ New Features

🧠 RAG-Enhanced Sampling (--mode rag)

The new hybrid sampling mode allows Sloop to find semantically related tools even when no direct edge exists in the graph.

  • Vector Retrieval: Powered by FAISS and LiteLLM, Sloop now indexes your tool definitions locally.
  • Semantic Associations: Capable of "hallucinating" logical next steps based on tool descriptions (e.g., associating "booking a flight" with "checking weather").
  • Persistent Caching: Vector indexes are cached in .cache/ for ultra-fast startup times.

πŸ‘¨β€βš–οΈ LLM Selector Agent

We have replaced random selection in RAG mode with a smart Selector Agent.

  • Context-Aware Decision: The agent analyzes the current conversation history and candidate tools to pick the most logical next action.
  • Smart Termination: The agent autonomously decides when a task is complete and returns FINISH.

🌍 Global Diversity Strategy

To prevent "Mode Collapse" (where the model repeatedly samples the same popular tools), we implemented a Global Coverage Sampling strategy. This forces the generator to explore the entire spectrum of available tools before repeating start nodes.

πŸ› οΈ Improvements & Refactoring

  • Standardized Configuration: Refactored config.py to explicitly separate Providers and Models.
    • New variables: LLM_PROVIDER, LLM_MODEL, EMBEDDING_PROVIDER, EMBEDDING_MODEL.
    • Backward Compatibility: Your existing .env files using MODEL_NAME will still work seamlessly.
  • New Dependencies: Added faiss-cpu and numpy for efficient vector operations.

πŸ“¦ How to Use

Generate synthetic data using the new intelligent mode:

# Standard RAG mode (Recommended for high-quality data)
sloop generate --mode rag --count 100

# Legacy random walk mode
sloop generate --mode graph --count 100

βš™οΈ Configuration Update

While not required (due to backward compatibility), we recommend updating your .env to utilize the new configuration structure, especially if using local embedding models:

# Chat Model Configuration
LLM_PROVIDER=openai
LLM_MODEL=gpt-4o-mini

# Embedding Configuration (New)
EMBEDDING_PROVIDER=openai
EMBEDDING_MODEL=text-embedding-3-small
# Or for local use:
# EMBEDDING_PROVIDER=ollama
# EMBEDDING_MODEL=nomic-embed-text