Skip to content

Commit

Permalink
2024-11-20-12:57:53
Browse files Browse the repository at this point in the history
  • Loading branch information
kristianfreeman committed Nov 20, 2024
1 parent b461b64 commit 968d9a5
Show file tree
Hide file tree
Showing 5 changed files with 651 additions and 92 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# cloudflare-retrieval-augmented-generation-example

This repo shows how to build a Retrieval Augmented Generation (RAG) application using Cloudflare Workers AI. It uses Cloudflare Workflows, D1, and Vectorize to store notes that can be used to generate context for the RAG model.
This repo shows how to build a Retrieval Augmented Generation (RAG) application using Cloudflare Workers AI. It uses Cloudflare Workflows, D1, and Vectorize to store notes that can be used to generate context for the RAG model. You can then use Cloudflare AI's Llama-based models, or Anthropic Claude to generate resopnses.

## Installation/Setup

Expand Down Expand Up @@ -59,6 +59,14 @@ After deploying, you can use the following routes:
- `/notes` is a list of all the notes in the AI's knowledge base.
- `/notes.json` is a JSON endpoint that returns all the notes in the AI's knowledge base.

If you would like to use Anthropic Claude instead of Workers AI, set the secret `ANTHROPIC_API_KEY` in your Workers application:

```bash
$ wrangler secret put ANTHROPIC_API_KEY your-api-key
```

Once you've set this secret, all text generation will be done by Claude.

## Tutorial

This project was created as part of a tutorial on [Building a Retrieval Augmented Generation (RAG) Application with Cloudflare Workers AI](https://developers.cloudflare.com/workers-ai/tutorials/build-a-retrieval-augmented-generation-ai/).
Expand Down
Loading

0 comments on commit 968d9a5

Please sign in to comment.