Skip to content

Deprecate global distance_threshold with semantic router #275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Feb 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,5 @@ pip-selfcheck.json
libs/redis/docs/.Trash*
.python-version
.idea/*
.vscode/settings.json
.python-version
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Choose from multiple Redis deployment options:


## 🗃️ Redis Index Management
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:
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:
```yaml
index:
name: user-idx
Expand Down Expand Up @@ -121,7 +121,7 @@ Choose from multiple Redis deployment options:
})
```

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:
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:
```python
from redis import Redis
from redisvl.index import SearchIndex
Expand All @@ -135,8 +135,8 @@ Choose from multiple Redis deployment options:
```
> Async compliant search index class also available: [AsyncSearchIndex](https://docs.redisvl.com/en/stable/api/searchindex.html#redisvl.index.AsyncSearchIndex).

3. [Load](https://docs.redisvl.com/en/stable/user_guide/getting_started_01.html#load-data-to-searchindex)
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:
3. [Load](https://docs.redisvl.com/en/stable/user_guide/01_getting_started.html#load-data-to-searchindex)
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:
```python
data = {"user": "john", "credit_score": "high", "embedding": [0.23, 0.49, -0.18, 0.95]}

Expand Down Expand Up @@ -183,7 +183,7 @@ Define queries and perform advanced searches over your indices, including the co
- [FilterQuery](https://docs.redisvl.com/en/stable/api/query.html#filterquery) - Standard search using filters and the full-text search
- [CountQuery](https://docs.redisvl.com/en/stable/api/query.html#countquery) - Count the number of indexed records given attributes

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


## 🔧 Utilities
Expand Down Expand Up @@ -216,11 +216,11 @@ embeddings = co.embed_many(
)
```

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


### Rerankers
[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
[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



Expand Down Expand Up @@ -257,7 +257,7 @@ print(response[0]["response"])
>>> Paris
```

> Learn more about [semantic caching]((https://docs.redisvl.com/en/stable/user_guide/llmcache_03.html)) for LLMs.
> Learn more about [semantic caching]((https://docs.redisvl.com/en/stable/user_guide/03_llmcache.html)) for LLMs.

### LLM Session Management

Expand Down Expand Up @@ -293,7 +293,7 @@ session.get_relevant("weather", top_k=1)
```stdout
>>> [{"role": "user", "content": "what is the weather going to be today?"}]
```
> Learn more about [LLM session management]((https://docs.redisvl.com/en/stable/user_guide/session_manager_07.html)).
> Learn more about [LLM session management]((https://docs.redisvl.com/en/stable/user_guide/07_session_manager.html)).


### LLM Semantic Routing
Expand Down Expand Up @@ -330,7 +330,7 @@ router("Hi, good morning")
```stdout
>>> RouteMatch(name='greeting', distance=0.273891836405)
```
> Learn more about [semantic routing](https://docs.redisvl.com/en/stable/user_guide/semantic_router_08.html).
> Learn more about [semantic routing](https://docs.redisvl.com/en/stable/user_guide/08_semantic_router.html).

## 🖥️ Command Line Interface
Create, destroy, and manage Redis index configurations from a purpose-built CLI interface: `rvl`.
Expand Down Expand Up @@ -360,7 +360,7 @@ The Redis Vector Library bridges the gap between the AI-native developer ecosyst
## 😁 Helpful Links

For additional help, check out the following resources:
- [Getting Started Guide](https://docs.redisvl.com/en/stable/user_guide/getting_started_01.html)
- [Getting Started Guide](https://docs.redisvl.com/en/stable/user_guide/01_getting_started.html)
- [API Reference](https://docs.redisvl.com/en/stable/api/index.html)
- [Example Gallery](https://docs.redisvl.com/en/stable/examples/index.html)
- [Redis AI Recipes](https://github.com/redis-developer/redis-ai-resources)
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ A powerful, AI-native Python client library for [Redis](https://redis.io). Lever
content: "Perform powerful vector search queries with complex filtering support."
- header: "{fas}`circle-half-stroke;pst-color-primary` Embedding Creation"
content: "Use OpenAI or any of the other supported vectorizers to create embeddings."
link: "user_guide/vectorizers_04"
link: "user_guide/04_vectorizers"
- header: "{fas}`palette;pst-color-primary` CLI"
content: "Interact with RedisVL using a Command Line Interface (CLI) for ease of use."
- header: "{fab}`python;pst-color-primary` Semantic Caching"
content: "Extend RedisVL to cache LLM results, increasing QPS and decreasing system cost."
link: "user_guide/llmcache_03"
link: "user_guide/03_llmcache"
- header: "{fas}`lightbulb;pst-color-primary` Example Gallery"
content: "Explore the gallery of examples to get started."
link: "examples/index"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.8.13 ('redisvl2')",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -711,14 +711,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.10"
"version": "3.11.9"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "9b1e6e9c2967143209c2f955cb869d1d3234f92dc4787f49f155f3abbdfb1316"
}
}
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
Expand Down
File renamed without changes.
Loading