cloudflare / cloudflare-docs

Cloudflare’s documentation
https://developers.cloudflare.com
Creative Commons Attribution 4.0 International
3.04k stars 4.41k forks source link

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

Closed hay closed 6 months ago

hay commented 1 year ago

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

travisby commented 12 months ago

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

markashleybell commented 9 months ago

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.

kodster28 commented 6 months ago

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.

hay commented 6 months ago

@kodster28 great, thanks!