You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+68-1Lines changed: 68 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,13 +69,14 @@ For complete code examples, see the following notebooks:
69
69
| Basic grid study |[00_grid_study.ipynb](https://github.com/redis-applied-ai/redis-retrieval-optimizer/blob/main/docs/examples/grid_study/00_grid_study.ipynb)|
70
70
| Custom grid study |[01_custom_grid_study.ipynb](https://github.com/redis-applied-ai/redis-retrieval-optimizer/blob/main/docs/examples/grid_study/01_custom_grid_study.ipynb)|
| Search study |[00_search_study.ipynb](https://github.com/redis-applied-ai/redis-retrieval-optimizer/blob/main/docs/examples/search_study/00_search_study.ipynb)|
72
73
| Embedding model comparison |[00_comparison.ipynb](https://github.com/redis-applied-ai/redis-retrieval-optimizer/blob/main/docs/examples/comparison/00_comparison.ipynb)|
73
74
74
75
---
75
76
76
77
## 🚀 Quick Start
77
78
78
-
The Retrieval Optimizer supports two*study* types: **Grid** and **Bayesian Optimization**. Each is suited to a different stage of building a high-quality search system.
79
+
The Retrieval Optimizer supports three*study* types: **Grid**, **Bayesian Optimization**, and **Search Study**. Each is suited to a different stage of building a high-quality search system.
79
80
80
81
### Grid
81
82
@@ -85,6 +86,10 @@ Use a grid study to explore the impact of different **embedding models** and **r
85
86
86
87
Once you've identified a solid starting point, use Bayesian optimization to **fine-tune your index configuration**. This mode intelligently selects the most promising combinations to test, in place of exhaustive testing (which is time-consuming). Bayesian optimization mode is especially useful for balancing **cost, speed, and latency** as you work toward a production-ready solution.
87
88
89
+
### Search Study
90
+
91
+
Use a search study when you have an **existing Redis index** and want to quickly test different search methods against it without recreating the index or data. This is ideal for A/B testing search strategies or evaluating custom search methods on production data.
92
+
88
93
## Running a Grid study
89
94
90
95
#### Study config
@@ -242,6 +247,68 @@ metrics = run_bayes_study(
242
247
243
248
---
244
249
250
+
## Running a Search study
251
+
252
+
Use a search study when you have an **existing Redis index** and want to quickly test different search methods against it without recreating the index or data. This is ideal for A/B testing search strategies or evaluating custom search methods on production data.
253
+
254
+
### Search study config
255
+
```yaml
256
+
embedding_model:
257
+
dim: 768
258
+
dtype: float32
259
+
embedding_cache_name: vec-cache
260
+
model: sentence-transformers/all-mpnet-base-v2
261
+
type: hf
262
+
index_name: cars
263
+
queries: "../resources/cars/car_queries.json"
264
+
qrels: "../resources/cars/car_qrels.json"
265
+
ret_k: 6
266
+
search_methods:
267
+
- base_vector
268
+
- pre_filter_vector
269
+
study_id: test-search-study
270
+
```
271
+
272
+
### Code
273
+
```python
274
+
import os
275
+
from redis_retrieval_optimizer.search_study import run_search_study
0 commit comments