Skip to content

Commit 5ad7d00

Browse files
authored
Deprecate global distance_threshold with semantic router (#275)
- change ownership of distance_threshold - move filtering to happen as part of db call - make code more DRY - rename user_guide because it's really been bothering me
1 parent e928d1f commit 5ad7d00

20 files changed

+967
-1144
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,3 +220,5 @@ pip-selfcheck.json
220220
libs/redis/docs/.Trash*
221221
.python-version
222222
.idea/*
223+
.vscode/settings.json
224+
.python-version

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Choose from multiple Redis deployment options:
7171

7272

7373
## 🗃️ Redis Index Management
74-
1. [Design a schema for your use case](https://docs.redisvl.com/en/stable/user_guide/getting_started_01.html#define-an-indexschema) that models your dataset with built-in Redis and indexable fields (*e.g. text, tags, numerics, geo, and vectors*). [Load a schema](https://docs.redisvl.com/en/stable/user_guide/getting_started_01.html#example-schema-creation) from a YAML file:
74+
1. [Design a schema for your use case](https://docs.redisvl.com/en/stable/user_guide/01_getting_started.html#define-an-indexschema) that models your dataset with built-in Redis and indexable fields (*e.g. text, tags, numerics, geo, and vectors*). [Load a schema](https://docs.redisvl.com/en/stable/user_guide/01_getting_started.html#example-schema-creation) from a YAML file:
7575
```yaml
7676
index:
7777
name: user-idx
@@ -121,7 +121,7 @@ Choose from multiple Redis deployment options:
121121
})
122122
```
123123

124-
2. [Create a SearchIndex](https://docs.redisvl.com/en/stable/user_guide/getting_started_01.html#create-a-searchindex) class with an input schema and client connection in order to perform admin and search operations on your index in Redis:
124+
2. [Create a SearchIndex](https://docs.redisvl.com/en/stable/user_guide/01_getting_started.html#create-a-searchindex) class with an input schema and client connection in order to perform admin and search operations on your index in Redis:
125125
```python
126126
from redis import Redis
127127
from redisvl.index import SearchIndex
@@ -135,8 +135,8 @@ Choose from multiple Redis deployment options:
135135
```
136136
> Async compliant search index class also available: [AsyncSearchIndex](https://docs.redisvl.com/en/stable/api/searchindex.html#redisvl.index.AsyncSearchIndex).
137137

138-
3. [Load](https://docs.redisvl.com/en/stable/user_guide/getting_started_01.html#load-data-to-searchindex)
139-
and [fetch](https://docs.redisvl.com/en/stable/user_guide/getting_started_01.html#fetch-an-object-from-redis) data to/from your Redis instance:
138+
3. [Load](https://docs.redisvl.com/en/stable/user_guide/01_getting_started.html#load-data-to-searchindex)
139+
and [fetch](https://docs.redisvl.com/en/stable/user_guide/01_getting_started.html#fetch-an-object-from-redis) data to/from your Redis instance:
140140
```python
141141
data = {"user": "john", "credit_score": "high", "embedding": [0.23, 0.49, -0.18, 0.95]}
142142
@@ -183,7 +183,7 @@ Define queries and perform advanced searches over your indices, including the co
183183
- [FilterQuery](https://docs.redisvl.com/en/stable/api/query.html#filterquery) - Standard search using filters and the full-text search
184184
- [CountQuery](https://docs.redisvl.com/en/stable/api/query.html#countquery) - Count the number of indexed records given attributes
185185

186-
> Read more about building [advanced Redis queries](https://docs.redisvl.com/en/stable/user_guide/hybrid_queries_02.html).
186+
> Read more about building [advanced Redis queries](https://docs.redisvl.com/en/stable/user_guide/02_hybrid_queries.html).
187187

188188

189189
## 🔧 Utilities
@@ -216,11 +216,11 @@ embeddings = co.embed_many(
216216
)
217217
```
218218

219-
> Learn more about using [vectorizers]((https://docs.redisvl.com/en/stable/user_guide/vectorizers_04.html)) in your embedding workflows.
219+
> Learn more about using [vectorizers]((https://docs.redisvl.com/en/stable/user_guide/04_vectorizers.html)) in your embedding workflows.
220220

221221

222222
### Rerankers
223-
[Integrate with popular reranking providers](https://docs.redisvl.com/en/stable/user_guide/rerankers_06.html) to improve the relevancy of the initial search results from Redis
223+
[Integrate with popular reranking providers](https://docs.redisvl.com/en/stable/user_guide/06_rerankers.html) to improve the relevancy of the initial search results from Redis
224224

225225

226226

@@ -257,7 +257,7 @@ print(response[0]["response"])
257257
>>> Paris
258258
```
259259
260-
> Learn more about [semantic caching]((https://docs.redisvl.com/en/stable/user_guide/llmcache_03.html)) for LLMs.
260+
> Learn more about [semantic caching]((https://docs.redisvl.com/en/stable/user_guide/03_llmcache.html)) for LLMs.
261261
262262
### LLM Session Management
263263
@@ -293,7 +293,7 @@ session.get_relevant("weather", top_k=1)
293293
```stdout
294294
>>> [{"role": "user", "content": "what is the weather going to be today?"}]
295295
```
296-
> Learn more about [LLM session management]((https://docs.redisvl.com/en/stable/user_guide/session_manager_07.html)).
296+
> Learn more about [LLM session management]((https://docs.redisvl.com/en/stable/user_guide/07_session_manager.html)).
297297
298298
299299
### LLM Semantic Routing
@@ -330,7 +330,7 @@ router("Hi, good morning")
330330
```stdout
331331
>>> RouteMatch(name='greeting', distance=0.273891836405)
332332
```
333-
> Learn more about [semantic routing](https://docs.redisvl.com/en/stable/user_guide/semantic_router_08.html).
333+
> Learn more about [semantic routing](https://docs.redisvl.com/en/stable/user_guide/08_semantic_router.html).
334334
335335
## 🖥️ Command Line Interface
336336
Create, destroy, and manage Redis index configurations from a purpose-built CLI interface: `rvl`.
@@ -360,7 +360,7 @@ The Redis Vector Library bridges the gap between the AI-native developer ecosyst
360360
## 😁 Helpful Links
361361

362362
For additional help, check out the following resources:
363-
- [Getting Started Guide](https://docs.redisvl.com/en/stable/user_guide/getting_started_01.html)
363+
- [Getting Started Guide](https://docs.redisvl.com/en/stable/user_guide/01_getting_started.html)
364364
- [API Reference](https://docs.redisvl.com/en/stable/api/index.html)
365365
- [Example Gallery](https://docs.redisvl.com/en/stable/examples/index.html)
366366
- [Redis AI Recipes](https://github.com/redis-developer/redis-ai-resources)

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ A powerful, AI-native Python client library for [Redis](https://redis.io). Lever
2020
content: "Perform powerful vector search queries with complex filtering support."
2121
- header: "{fas}`circle-half-stroke;pst-color-primary` Embedding Creation"
2222
content: "Use OpenAI or any of the other supported vectorizers to create embeddings."
23-
link: "user_guide/vectorizers_04"
23+
link: "user_guide/04_vectorizers"
2424
- header: "{fas}`palette;pst-color-primary` CLI"
2525
content: "Interact with RedisVL using a Command Line Interface (CLI) for ease of use."
2626
- header: "{fab}`python;pst-color-primary` Semantic Caching"
2727
content: "Extend RedisVL to cache LLM results, increasing QPS and decreasing system cost."
28-
link: "user_guide/llmcache_03"
28+
link: "user_guide/03_llmcache"
2929
- header: "{fas}`lightbulb;pst-color-primary` Example Gallery"
3030
content: "Explore the gallery of examples to get started."
3131
link: "examples/index"

docs/user_guide/getting_started_01.ipynb renamed to docs/user_guide/01_getting_started.ipynb

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@
697697
],
698698
"metadata": {
699699
"kernelspec": {
700-
"display_name": "Python 3.8.13 ('redisvl2')",
700+
"display_name": "Python 3",
701701
"language": "python",
702702
"name": "python3"
703703
},
@@ -711,14 +711,9 @@
711711
"name": "python",
712712
"nbconvert_exporter": "python",
713713
"pygments_lexer": "ipython3",
714-
"version": "3.11.10"
714+
"version": "3.11.9"
715715
},
716-
"orig_nbformat": 4,
717-
"vscode": {
718-
"interpreter": {
719-
"hash": "9b1e6e9c2967143209c2f955cb869d1d3234f92dc4787f49f155f3abbdfb1316"
720-
}
721-
}
716+
"orig_nbformat": 4
722717
},
723718
"nbformat": 4,
724719
"nbformat_minor": 2
File renamed without changes.

0 commit comments

Comments
 (0)