Skip to content

Commit 4e5ae43

Browse files
authored
Router Optimization notebook (#65)
1 parent c70377e commit 4e5ae43

File tree

9 files changed

+1519
-6
lines changed

9 files changed

+1519
-6
lines changed

.github/ignore-notebooks.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
01_crewai_langgraph_redis
2-
doc2cache_llama3_1
3-
semantic_caching_gemini
2+
01_doc2cache_llama3_1
3+
00_semantic_caching_gemini
44
01_collaborative_filtering
55
05_nvidia_ai_rag_redis
6+
01_routing_optimization
7+
02_semantic_cache_optimization

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.11
1+
3.11.8

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,17 @@ An estimated 31% of LLM queries are potentially redundant ([source](https://arxi
7777

7878
| Recipe | Description |
7979
| --- | --- |
80-
| [/semantic-cache/doc2cache_llama3_1.ipynb](python-recipes/semantic-cache/doc2cache_llama3_1.ipynb) | Build a semantic cache using the Doc2Cache framework and Llama3.1 |
81-
| [/semantic-cache/semantic_caching_gemini.ipynb](python-recipes/semantic-cache/semantic_caching_gemini.ipynb) | Build a semantic cache with Redis and Google Gemini |
80+
| [/semantic-cache/00_semantic_caching_gemini.ipynb](python-recipes/semantic-cache/00_semantic_caching_gemini.ipynb) | Build a semantic cache with Redis and Google Gemini |
81+
| [/semantic-cache/01_doc2cache_llama3_1.ipynb](python-recipes/semantic-cache/01_doc2cache_llama3_1.ipynb) | Build a semantic cache using the Doc2Cache framework and Llama3.1 |
82+
| [/semantic-cache/02_semantic_cache_optimization.ipynb](python-recipes/semantic-cache/02_semantic_cache_optimization.ipynb) | Use CacheThresholdOptimizer from redisvl to setup best cache config |
8283

8384
### Semantic Routing
8485
Routing is a simple and effective way of preventing misuses with your AI application or for creating branching logic between data sources etc.
8586

8687
| Recipe | Description |
8788
| --- | --- |
8889
| [/semantic-router/00_semantic_routing.ipynb](python-recipes/semantic-router/00_semantic_routing.ipynb) | Simple examples of how to build an allow/block list router in addition to a multi-topic router |
90+
| [/semantic-router/01_routing_optimization.ipynb](python-recipes/semantic-router/01_routing_optimization.ipynb) | Use RouterThresholdOptimizer from redisvl to setup best router config |
8991

9092
### Agents
9193

python-recipes/semantic-cache/semantic_caching_gemini.ipynb renamed to python-recipes/semantic-cache/00_semantic_caching_gemini.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"source": [
99
"# Building a Semantic Cache with Redis and VertexAI Gemini Model\n",
1010
"\n",
11-
"<a href=\"https://colab.research.google.com/github/redis-developer/redis-ai-resources/blob/main/python-recipes/semantic-cache/semantic_caching_gemini.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n"
11+
"<a href=\"https://colab.research.google.com/github/redis-developer/redis-ai-resources/blob/main/python-recipes/semantic-cache/00_semantic_caching_gemini.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>\n"
1212
]
1313
},
1414
{

0 commit comments

Comments
 (0)