cloudflare-docs icon indicating copy to clipboard operation
cloudflare-docs copied to clipboard

A couple of notes on "Build a Retrieval Augmented Generation (RAG) AI"

Open hay opened this issue 2 years ago • 2 comments

Which Cloudflare product does this pertain to?

Workers AI

Existing documentation URL(s)

https://developers.cloudflare.com/workers-ai/tutorials/build-a-retrieval-augmented-generation-ai/

What changes are you suggesting?

A couple of suggestions for this tutorial:

  1. Under "Create a new Worker project" the option with step 2 should not be "Select "Hello World" script but "Hello World" Worker
  2. There seems to be a bug in the first code example: the ai.run function either wants a messages or a prompt property, but currently the code states inputs which i don't think is the correct API interface.
  3. After step 4 ("Adding embeddings") the wrangler command is not preceeded by npx, which means it won't work if you haven't installed wrangler globally.
  4. When i tried running the wrangler command to make a vector database i got an error "vectorize.not_entitled". This turns out to be an indication that you can only use this command if you've got a paid worker plan (reference). I think it would be useful to mention this at the beginning of the tutorial, now i'm forced to take a paid plan to complete the tutorial.

Additional information

No response

hay avatar Oct 07 '23 14:10 hay

I can confirm issues 1, 3, and 4 from working through the tutorial this morning! It looks like 2 has already been solved

travisby avatar Nov 06 '23 13:11 travisby

Yes, I also hit 1/3/4 just now. Issue 2 didn't come up for me either, so I assume that one is now fixed.

markashleybell avatar Feb 04 '24 16:02 markashleybell

Howdy @hay, thanks for raising + providing the really detailed feedback (and apologies this sat for a bit).

In checking through your list, it appears that 1/2/3 have been previously addressed, but 4 has not. Pushing up #14192 to address the piece, which I think'd close out this issue.

kodster28 avatar Apr 22 '24 22:04 kodster28

@kodster28 great, thanks!

hay avatar Apr 23 '24 16:04 hay