Prompt engineering for RAG

Hey there!

So, the reason why you likely don’t see as much about what happens after retrieval is because it’s often a case-by-case basis with which RAG is used, and the uses can very widely.

For example, you are assuming that RAG is used in a multi-shot conversational prompt.

These can be interesting prompts, but note it requires the conversation maintains itself after the retrieval. For example, you may want to build a RAG db for enhanced search of certain product listings. The user would not know about RAG, and the conversation itself does not necessarily need to extend beyond the single request.

Retrieval is often aided by refining specific prompts actually, so you’re on the right track! It just takes a lot of trial, error, and experimentation!

1 Like