Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,16 @@ A set of Java recipes can be found under [/java-recipes](/java-recipes/README.md

#### Notebooks

| Notebook | Description |
|---------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
| [notebooks/RAG/spring_ai_redis_rag.ipynb](./java-recipes/notebooks/RAG/spring_ai_redis_rag.ipynb) | Demonstrates building a RAG-ba sed beer recommendation chatbot using Spring AI and Redis as the vector store |
| Notebook | Description |
|------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
| [notebooks/RAG/spring_ai_redis_rag.ipynb](./java-recipes/notebooks/RAG/spring_ai_redis_rag.ipynb) | Demonstrates building a RAG-ba sed beer recommendation chatbot using Spring AI and Redis as the vector store |
| [RAG/spring_ai_redis_rag.ipynb](./RAG/spring_ai_redis_rag.ipynb) | Demonstrates building a RAG-based beer recommendation chatbot using Spring AI and Redis as the vector store |
| [semantic-routing/1_semantic_classification.ipynb](./semantic-routing/1_semantic_classification.ipynb) | Demonstrates how to perform text classification with vector search (RedisVL) instead of LLMs |
| [semantic-routing/2_semantic_tool_calling.ipynb](./semantic-routing/2_semantic_tool_calling.ipynb) | Demonstrates how to perform tool selection with vector search (RedisVL) instead of LLMs |
| [semantic-routing/3_semantic_guardrails.ipynb](./semantic-routing/3_semantic_guardrails.ipynb) | Demonstrates how to implement guardrails with vector search (RedisVL) |
| [semantic-caching/1_pre_generated_semantic_caching.ipynb](./semantic-caching/1_pre_generated_semantic_caching.ipynb) | Demonstrates how to perform pre generated semantic caching with RedisVL |
| [semantic-caching/2_semantic_caching_with_langcache.ipynb](./semantic-caching/2_semantic_caching_with_langcache.ipynb) | Demonstrates how to perform pre generated semantic caching with LangCache |


#### Applications

Expand Down
11 changes: 8 additions & 3 deletions java-recipes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,14 @@ There are two types of Java Recipes: Notebooks and Applications. Notebooks are i

Notebooks require a Jupyter Notebook environment to run. Check out the [Setup Instructions & Implementation Details](./notebooks/README.md) for more details on how to set up your environment.

| Notebook | Description |
|--------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
| [notebooks/RAG/spring_ai_redis_rag.ipynb](./notebooks/RAG/spring_ai_redis_rag.ipynb) | Demonstrates building a RAG-ba sed beer recommendation chatbot using Spring AI and Redis as the vector store |
| Notebook | Description |
|------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|
| [RAG/spring_ai_redis_rag.ipynb](./RAG/spring_ai_redis_rag.ipynb) | Demonstrates building a RAG-based beer recommendation chatbot using Spring AI and Redis as the vector store |
| [semantic-routing/1_semantic_classification.ipynb](./semantic-routing/1_semantic_classification.ipynb) | Demonstrates how to perform text classification with vector search (RedisVL) instead of LLMs |
| [semantic-routing/2_semantic_tool_calling.ipynb](./semantic-routing/2_semantic_tool_calling.ipynb) | Demonstrates how to perform tool selection with vector search (RedisVL) instead of LLMs |
| [semantic-routing/3_semantic_guardrails.ipynb](./semantic-routing/3_semantic_guardrails.ipynb) | Demonstrates how to implement guardrails with vector search (RedisVL) |
| [semantic-caching/1_pre_generated_semantic_caching.ipynb](./semantic-caching/1_pre_generated_semantic_caching.ipynb) | Demonstrates how to perform pre generated semantic caching with RedisVL |
| [semantic-caching/2_semantic_caching_with_langcache.ipynb](./semantic-caching/2_semantic_caching_with_langcache.ipynb) | Demonstrates how to perform pre generated semantic caching with LangCache |

## Applications

Expand Down
Empty file.
14 changes: 9 additions & 5 deletions java-recipes/notebooks/RAG/spring_ai_redis_rag.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,22 @@
},
{
"cell_type": "code",
"execution_count": 1,
"id": "f0483426-9a2a-4fc1-a184-9ba3343d2bf9",
"metadata": {},
"outputs": [],
"metadata": {
"jupyter": {
"is_executing": true
}
},
"source": [
"%mavenRepo spring_milestones https://repo.spring.io/milestone/ \n",
"%maven \"org.springframework.ai:spring-ai-openai:1.0.0-M6\"\n",
"%maven \"org.springframework.ai:spring-ai-transformers:1.0.0-M6\"\n",
"%maven \"org.springframework.ai:spring-ai-redis-store:1.0.0-M6\"\n",
"%maven \"org.slf4j:slf4j-simple:2.0.17\" \n",
"%maven \"redis.clients:jedis:5.2.0\""
]
],
"outputs": [],
"execution_count": null
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -268,7 +272,7 @@
"String[] KEYS = { \"name\", \"abv\", \"ibu\", \"description\" };\n",
"\n",
"// Data path\n",
"String filePath = \"../resources/beers.json.gz\";\n",
"String filePath = \"./resources/beers.json.gz\";\n",
"\n",
"// Check if embeddings are already loaded\n",
"Map<String, Object> indexInfo = vectorStore.getJedis().ftInfo(\"beers\");\n",
Expand Down
14 changes: 10 additions & 4 deletions java-recipes/notebooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

This project uses Docker Compose to set up a complete environment for running Java-based AI applications with Redis. The environment includes:

- A Jupyter Notebook server with Java kernel support
- A Jupyter Notebook server with Java kernel support (For notebooks that based on Java)
- Redis Stack (includes Redis and RedisInsight)
- Pre-installed dependencies for AI/ML workloads

Expand Down Expand Up @@ -79,9 +79,15 @@ OPENAI_API_KEY=your_openai_api_key_here

## Notebooks

| Notebook | Description |
| --- | --- |
| [RAG/spring_ai_redis_rag.ipynb](./RAG/spring_ai_redis_rag.ipynb) | Demonstrates building a RAG-based beer recommendation chatbot using Spring AI and Redis as the vector store |
| Notebook | Description |
|------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|
| [RAG/spring_ai_redis_rag.ipynb](./RAG/spring_ai_redis_rag.ipynb) | Demonstrates building a RAG-based beer recommendation chatbot using Spring AI and Redis as the vector store |
| [semantic-routing/1_semantic_classification.ipynb](./semantic-routing/1_semantic_classification.ipynb) | Demonstrates how to perform text classification with vector search (RedisVL) instead of LLMs |
| [semantic-routing/2_semantic_tool_calling.ipynb](./semantic-routing/2_semantic_tool_calling.ipynb) | Demonstrates how to perform tool selection with vector search (RedisVL) instead of LLMs |
| [semantic-routing/3_semantic_guardrails.ipynb](./semantic-routing/3_semantic_guardrails.ipynb) | Demonstrates how to implement guardrails with vector search (RedisVL) |
| [semantic-caching/1_pre_generated_semantic_caching.ipynb](./semantic-caching/1_pre_generated_semantic_caching.ipynb) | Demonstrates how to perform pre generated semantic caching with RedisVL |
| [semantic-caching/2_semantic_caching_with_langcache.ipynb](./semantic-caching/2_semantic_caching_with_langcache.ipynb) | Demonstrates how to perform pre generated semantic caching with LangCache |


## Project Structure

Expand Down
Binary file removed java-recipes/notebooks/resources/beers.json.gz
Binary file not shown.
Loading
Loading