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: CONTRIBUTING.md
+15-6Lines changed: 15 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -15,21 +15,30 @@ helpful contributions that mean less work for you.
15
15
16
16
## Your First Contribution
17
17
18
-
Unsure where to begin contributing? You can start by looking through some of our issues [listed here](https://github.com/RedisVentures/data-loader/issues).
18
+
Unsure where to begin contributing? You can start by looking through some of our issues [listed here](https://github.com/RedisVentures/redisvl/issues).
19
19
20
20
## Getting Started
21
21
22
22
Here's how to get started with your code contribution:
23
23
24
24
1. Create your own fork of this repo
25
-
2.Apply the changes in your fork
26
-
3._We're still working on a development environment setup -- so stay tuned_
27
-
4. If you like the change and think the project could use it, send a
25
+
2.Set up your developer environment
26
+
2.Apply the changes in your forked codebase / environment
27
+
4. If you like the change and think the project could use it, send us a
28
28
pull request.
29
29
30
+
### Dev Environment
31
+
There is a provided `requirements.txt` and `requirements-dev.txt` file you can use to install required libraries with `pip` into your virtual environment.
32
+
30
33
### Docker Tips
31
34
32
-
>COMING SOON
35
+
Make sure to have [Redis](https://redis.io) accessible with Search & Query features enabled on [Redis Cloud](https://redis.com/try-free) or locally in docker with [Redis Stack](https://redis.io/docs/getting-started/install-stack/docker/):
36
+
37
+
```bash
38
+
docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest
39
+
```
40
+
41
+
This will also spin up the [Redis Insight GUI](https://redis.com/redis-enterprise/redis-insight/) at `http://localhost:8001`.
33
42
34
43
## How to Report a Bug
35
44
@@ -55,7 +64,7 @@ issue, so if you're unsure, just email us.
55
64
When filing an issue, make sure to answer these five questions:
56
65
57
66
1. What version of python are you using?
58
-
2. What version of redis are you using?
67
+
2. What version of `redis` and `redisvl` are you using?
Copy file name to clipboardExpand all lines: README.md
+51-11Lines changed: 51 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ RedisVL has a host of powerful features designed to streamline your vector datab
51
51
-**Semantic Caching**: `LLMCache` is a semantic caching interface built directly into RedisVL. It allows for the caching of generated output from LLMs like GPT-3 and others. As semantic search is used to check the cache, a threshold can be set to determine if the cached result is relevant enough to be returned. If not, the model is called and the result is cached for future use. This can increase the QPS and reduce the cost of using LLM models in production.
52
52
53
53
54
-
## 😊 Quick Start
54
+
## Installation
55
55
56
56
Please note that this library is still under heavy development, and while you can quickly try RedisVL and deploy it in a production environment, the API may be subject to change at any time.
57
57
@@ -81,7 +81,7 @@ This will also spin up the [Redis Insight GUI](https://redis.com/redis-enterpris
81
81
82
82
### Index Management
83
83
84
-
Indices can be defined through yaml specificationthat corresponds directly to the RediSearch field names and arguments in redis-py
84
+
Indices can be defined through yaml specification, or json, that correspond directly to the Redis index, field names and arguments in `redis-py`. Take this example `idx.yaml` file:
85
85
86
86
```yaml
87
87
index:
@@ -105,7 +105,7 @@ fields:
105
105
distance_metric: cosine
106
106
```
107
107
108
-
This would correspond to a dataset that looked something like
108
+
This would correspond to a dataset that looked something like:
109
109
110
110
| user | age | job | credit_score | user_embedding |
@@ -114,14 +114,14 @@ This would correspond to a dataset that looked something like
114
114
| joe | 3 | dentist | medium | \x3f\xab\xcc?\xab\xcc?@ |
115
115
116
116
117
-
With the schema, the RedisVL library can be used to create, load vectors and perform vector searches
117
+
With the YAML schema, the RedisVL library can be used to create the index, load vectors and perform vector searches:
118
118
```python
119
119
120
120
from redisvl.index import SearchIndex
121
121
from redisvl.query import VectorQuery
122
122
123
-
# initialize the index and connect to Redis
124
-
index = SearchIndex.from_dict(schema)
123
+
# initialize the index and connect to local Redis
124
+
index = SearchIndex.from_schema("idx.yaml")
125
125
index.connect("redis://localhost:6379")
126
126
127
127
# create the index in Redis
@@ -140,9 +140,9 @@ results = index.query(query)
140
140
141
141
```
142
142
143
-
### Flexible Querying
143
+
### Redis Filter Expressions
144
144
145
-
RedisVL supports a variety of filter types, including tag, numeric, geographic, and full text search to create filter expressions. Filter expressions can be used to create hybrid queries which allow you to combine multiple query types (i.e. text and vector search) into a single query.
145
+
RedisVL supports a variety of filter types, including tag, numeric, geographic, and full text search to create *Filter Expressions*. Filter expressions can be used to create hybrid queries which allow you to combine multiple complex data types (i.e. text and vector search) into a single query.
146
146
147
147
```python
148
148
from redisvl.index import SearchIndex
@@ -174,6 +174,40 @@ results = index.query(query)
174
174
175
175
```
176
176
177
+
### Interoperability with core Redis Clients
178
+
The purpose of RedisVL is **NOT** to fully replace your usage of the trusted Redis client libraries. It's simply here to make your life easier getting started and building generative AI applications on top of Redis. With that in mind, the RedisVL query interface and filter expressions can be ported and used with clients like `redis-py`.
179
+
180
+
Take the example filter expression from above:
181
+
```python
182
+
print(str(filter_expression))
183
+
```
184
+
185
+
This prints the RediSearch hybrid filter expression:
The ``LLMCache`` Interface in RedisVL can be used as follows.
@@ -193,11 +227,17 @@ cache.check("What is the capital of France?")
193
227
# store a result for a given query
194
228
cache.store("What is the capital of France?", "Paris")
195
229
196
-
#Cache will now have the query
230
+
#cache will now have the query
197
231
cache.check("What is the capital of France?")
198
232
["Paris"]
199
233
200
-
#Cache will still return the result if the query is similar enough
201
-
cache.check("What really is the capital of France?")
234
+
#cache will still return the result if the query is similar enough
235
+
cache.check("Question -- What really is the capital of France?")
202
236
["Paris"]
203
237
```
238
+
<<<<<<< HEAD
239
+
=======
240
+
241
+
## Contributing
242
+
Please help us by contributing PRs or opening GitHub issues for desired behaviors or discovered bugs. [Read more about how to contribute to RedisVL!](CONTRIBUTING.md)
0 commit comments