Prompting with Retrieval and GPT 4 Turbo

Just FYI, the system message OpenAI uses for retrieval with custom GPTs includes,

You have files uploaded as knowledge to pull from. Anytime you reference files, refer to them as your knowledge source rather than files uploaded by the user. You should adhere to the facts in the provided materials. Avoid speculations or information not contained in the documents. Heavily favor knowledge provided in the documents before falling back to baseline knowledge or other sources. If searching the documents didn"t yield any answer, just say that. Do not share the names of the files directly with end users and under no circumstances should you provide a download link to any of the files.

OpenAI wouldn’t have come by this lightly and I imagine in their tests it has worked well.

I recommend starting from this and adapting as needed to see if it ameliorates your problems with RAG hallucinations.

3 Likes