Repository navigation
v0.2.0
π 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.pyto explicitly separate Providers and Models.- New variables:
LLM_PROVIDER,LLM_MODEL,EMBEDDING_PROVIDER,EMBEDDING_MODEL. - Backward Compatibility: Your existing
.envfiles usingMODEL_NAMEwill still work seamlessly.
- New variables:
- New Dependencies: Added
faiss-cpuandnumpyfor 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