|
| 1 | +# Redis Retrieval Optimizer v0.3.0 Release Notes |
| 2 | + |
| 3 | +## 🎉 What's New in v0.3.0 |
| 4 | + |
| 5 | +Redis Retrieval Optimizer v0.3.0 introduces several major features that make it easier than ever to build and optimize high-performance search systems with Redis. This release focuses on enhanced optimization capabilities, improved search methods, and better integration with modern embedding models. |
| 6 | + |
| 7 | +## 🚀 Major New Features |
| 8 | + |
| 9 | +### 🎛️ Threshold Optimization |
| 10 | +**NEW**: Automatically tune semantic cache and router thresholds for optimal performance. |
| 11 | + |
| 12 | +The new threshold optimization feature helps you maximize the performance of RedisVL's Semantic Cache and Semantic Router by automatically finding the best distance thresholds. This feature supports multiple evaluation metrics including F1 score, precision, and recall. |
| 13 | + |
| 14 | +**Key capabilities:** |
| 15 | +- **Cache Threshold Optimization**: Optimize thresholds for semantic caches to improve cache hit rates and relevance |
| 16 | +- **Router Threshold Optimization**: Fine-tune route thresholds for semantic routers to improve routing accuracy |
| 17 | +- **Multiple Evaluation Metrics**: Support for F1 score, precision, and recall optimization |
| 18 | +- **Easy Integration**: Works seamlessly with existing RedisVL SemanticCache and SemanticRouter instances |
| 19 | + |
| 20 | +**Example usage:** |
| 21 | +```python |
| 22 | +from redis_retrieval_optimizer.threshold_optimization import CacheThresholdOptimizer |
| 23 | + |
| 24 | +# Optimize cache threshold |
| 25 | +optimizer = CacheThresholdOptimizer(cache, test_data) |
| 26 | +optimizer.optimize() |
| 27 | + |
| 28 | +# Optimize router thresholds |
| 29 | +optimizer = RouterThresholdOptimizer(router, test_data) |
| 30 | +optimizer.optimize(max_iterations=20, search_step=0.1) |
| 31 | +``` |
| 32 | + |
| 33 | +### 🔄 Weighted Reciprocal Rank Fusion (Weighted RRF) |
| 34 | +**NEW**: Advanced search method that combines multiple retrieval strategies with configurable weighting. |
| 35 | + |
| 36 | +Weighted RRF allows you to intelligently blend BM25 and vector search results with controlled weighting parameters. This method is particularly effective when different search strategies have complementary strengths. |
| 37 | + |
| 38 | +**Features:** |
| 39 | +- Configurable weighting between BM25 and vector search |
| 40 | +- Parameter k controls how quickly rankings decay |
| 41 | +- Handles cases where methods have complementary strengths |
| 42 | +- Improved relevance through intelligent result fusion |
| 43 | + |
| 44 | +### 🧠 Enhanced Vector Data Type Support |
| 45 | +**NEW**: Support for multiple vector data types including float16 and float32. |
| 46 | + |
| 47 | +You can now test different vector data types to find the optimal balance between memory usage and precision. This is especially useful for production deployments where memory efficiency is crucial. |
| 48 | + |
| 49 | +**Supported data types:** |
| 50 | +- `float16`: Reduced memory usage with acceptable precision |
| 51 | +- `float32`: Standard precision (default) |
| 52 | + |
| 53 | +**Configuration:** |
| 54 | +```yaml |
| 55 | +vector_data_types: ["float16", "float32"] |
| 56 | +``` |
| 57 | +
|
| 58 | +### 🤖 OpenAI Embedding Model Support |
| 59 | +**NEW**: Native support for OpenAI's text-embedding-3-small model. |
| 60 | +
|
| 61 | +The optimizer now supports OpenAI's latest embedding models, allowing you to compare their performance against HuggingFace models in your studies. |
| 62 | +
|
| 63 | +**Supported models:** |
| 64 | +- `text-embedding-3-small` (1536 dimensions) |
| 65 | +- All existing HuggingFace models |
| 66 | + |
| 67 | +**Example configuration:** |
| 68 | +```yaml |
| 69 | +embedding_models: |
| 70 | + - type: "openai" |
| 71 | + model: "text-embedding-3-small" |
| 72 | + dim: 1536 |
| 73 | + embedding_cache_name: "openai-small-vec-cache" |
| 74 | +``` |
| 75 | + |
| 76 | +## 🔧 Improvements & Enhancements |
| 77 | + |
| 78 | +### 📊 Enhanced Search Methods |
| 79 | +- **Improved BM25**: Better handling of edge cases and error recovery |
| 80 | +- **Enhanced Hybrid Search**: More robust combination of lexical and semantic search |
| 81 | +- **Optimized Reranking**: Improved cross-encoder integration with better error handling |
| 82 | +- **Better Vector Search**: Enhanced distance metric support and query optimization |
| 83 | + |
| 84 | +### 🛠️ Developer Experience |
| 85 | +- **Better Error Handling**: More graceful error recovery across all search methods |
| 86 | +- **Improved Logging**: Enhanced logging for debugging and monitoring |
| 87 | +- **Type Safety**: Better type hints and validation throughout the codebase |
| 88 | +- **Documentation**: Comprehensive examples and API documentation |
| 89 | + |
| 90 | +### 🔌 Extensibility |
| 91 | +- **Custom Search Methods**: Easier creation of domain-specific search strategies |
| 92 | +- **Flexible Corpus Processors**: Support for custom data formats and processing |
| 93 | +- **Modular Architecture**: Better separation of concerns for easier extension |
| 94 | + |
| 95 | +## 📚 New Documentation & Examples |
| 96 | + |
| 97 | +### 📖 Comprehensive Examples |
| 98 | +- **Threshold Optimization**: Complete notebook showing cache and router optimization |
| 99 | +- **Model Comparison**: Side-by-side comparison of different embedding models |
| 100 | +- **Custom Grid Study**: Advanced example with domain-specific search methods |
| 101 | +- **Bayesian Optimization**: Detailed guide for fine-tuning index configurations |
| 102 | + |
| 103 | +### 🔍 API Documentation |
| 104 | +- Complete API reference for all new features |
| 105 | +- Detailed configuration guides |
| 106 | +- Best practices and performance tips |
| 107 | + |
| 108 | +## 🐛 Bug Fixes |
| 109 | + |
| 110 | +- Fixed issue with embedding cache name collisions |
| 111 | +- Improved handling of empty search results |
| 112 | +- Better error messages for configuration issues |
| 113 | +- Fixed memory leaks in long-running studies |
| 114 | +- Resolved issues with Redis connection handling |
| 115 | + |
| 116 | +## 🔄 Breaking Changes |
| 117 | + |
| 118 | +**None**: This release maintains full backward compatibility with v0.2.x. |
| 119 | + |
| 120 | +## 📦 Installation |
| 121 | + |
| 122 | +```bash |
| 123 | +pip install redis-retrieval-optimizer==0.3.0 |
| 124 | +``` |
| 125 | + |
| 126 | +## 🎯 Migration Guide |
| 127 | + |
| 128 | +No migration required! All existing configurations and code will work without changes. New features are opt-in and can be added to your existing studies. |
| 129 | + |
| 130 | +## 🚀 Quick Start with New Features |
| 131 | + |
| 132 | +### Threshold Optimization |
| 133 | +```python |
| 134 | +from redis_retrieval_optimizer.threshold_optimization import CacheThresholdOptimizer |
| 135 | +
|
| 136 | +# Create test data |
| 137 | +test_data = [ |
| 138 | + {"query": "What's the capital of France?", "query_match": "paris_key"}, |
| 139 | + {"query": "What's the capital of Britain?", "query_match": ""} |
| 140 | +] |
| 141 | +
|
| 142 | +# Optimize cache threshold |
| 143 | +optimizer = CacheThresholdOptimizer(cache, test_data) |
| 144 | +optimizer.optimize() |
| 145 | +``` |
| 146 | + |
| 147 | +### Weighted RRF |
| 148 | +```yaml |
| 149 | +search_methods: ["bm25", "vector", "hybrid", "rerank", "weighted_rrf"] |
| 150 | +``` |
| 151 | + |
| 152 | +### Vector Data Types |
| 153 | +```yaml |
| 154 | +vector_data_types: ["float16", "float32"] |
| 155 | +``` |
| 156 | + |
| 157 | +### OpenAI Embeddings |
| 158 | +```yaml |
| 159 | +embedding_models: |
| 160 | + - type: "openai" |
| 161 | + model: "text-embedding-3-small" |
| 162 | + dim: 1536 |
| 163 | + embedding_cache_name: "openai-cache" |
| 164 | +``` |
| 165 | + |
| 166 | +## 🙏 Acknowledgments |
| 167 | + |
| 168 | +Thank you to all contributors who helped make this release possible! Special thanks to the Redis community for feedback and testing. |
| 169 | + |
| 170 | +## 📞 Support |
| 171 | + |
| 172 | +- **Documentation**: [GitHub Wiki](https://github.com/redis-applied-ai/redis-retrieval-optimizer) |
| 173 | +- **Issues**: [GitHub Issues](https://github.com/redis-applied-ai/redis-retrieval-optimizer/issues) |
| 174 | +- **Discussions**: [GitHub Discussions](https://github.com/redis-applied-ai/redis-retrieval-optimizer/discussions) |
| 175 | + |
| 176 | +--- |
| 177 | + |
| 178 | +**Stop guessing. Start measuring.** 📊 |
| 179 | + |
| 180 | +Transform your retrieval system from *"looks good to me"* to *"proven to perform"* with Redis Retrieval Optimizer v0.3.0! |
0 commit comments