Skip to content

Commit f38bc79

Browse files
adds content filtering notebook and corresponding dataset (#34)
* adds content filtering notebook and corresponding schema file * updates readme * added to tests --------- Co-authored-by: Robert Shelton <robert.b.shelton.42@gmail.com> Co-authored-by: Robert Shelton <robert.shelton@redis.com>
1 parent 7682b5f commit f38bc79

File tree

6 files changed

+681
-3
lines changed

6 files changed

+681
-3
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ jobs:
5050
GCP_REGION: ${{ secrets.GCP_REGION }}
5151
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
5252
run: |
53-
pytest --verbose --nbval-lax python-recipes/RAG/ python-recipes/vector-search python-recipes/redis-intro --ignore python-recipes/RAG/05_nvidia_ai_rag_redis.ipynb --ignore python-recipes/semantic-cache/doc2cache_llama3_1.ipynb
53+
pytest --verbose --nbval-lax python-recipes/RAG/ python-recipes/vector-search python-recipes/redis-intro python-recipes/recommendation-systems --ignore python-recipes/RAG/05_nvidia_ai_rag_redis.ipynb --ignore python-recipes/semantic-cache/doc2cache_llama3_1.ipynb

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ For further insights on enhancing RAG applications with dense content representa
9696

9797
## Recommendation systems
9898

99+
| Recipe | Description |
100+
| --- | --- |
101+
| [/recommendation-systems/content_filtering.ipynb](python-recipes/recommendation-systems/content_filtering.ipynb) | Intro content filtering example with redisvl |
102+
103+
### See also
99104
An exciting example of how Redis can power production-ready systems is highlighted in our collaboration with [NVIDIA](https://developer.nvidia.com/blog/offline-to-online-feature-storage-for-real-time-recommendation-systems-with-nvidia-merlin/) to construct a state-of-the-art recommendation system.
100105

101106
Within [this repository](https://github.com/redis-developer/redis-nvidia-recsys), you'll find three examples, each escalating in complexity, showcasing the process of building such a system.

python-recipes/RAG/01_redisvl.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@
439439
" 'chunk_id': i,\n",
440440
" 'content': chunk.page_content,\n",
441441
" # For HASH -- must convert embeddings to bytes\n",
442-
" 'text_embedding': array_to_buffer(embeddings[i])\n",
442+
" 'text_embedding': array_to_buffer(embeddings[i], dtype='float32')\n",
443443
" } for i, chunk in enumerate(chunks)\n",
444444
"]\n",
445445
"\n",

python-recipes/RAG/04_advanced_redisvl.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@
574574
" 'chunk_id': f'{i}',\n",
575575
" 'proposition': proposition,\n",
576576
" # For HASH -- must convert embeddings to bytes\n",
577-
" 'text_embedding': array_to_buffer(prop_embeddings[i])\n",
577+
" 'text_embedding': array_to_buffer(prop_embeddings[i], dtype=\"float32\")\n",
578578
" } for i, proposition in enumerate(propositions)\n",
579579
"]\n",
580580
"\n",

0 commit comments

Comments
 (0)