This doesn’t work =>
examples_context = “Only use the below documents.
I am unable to understand below. Please provide example. Where do I get return_prompt?
Set the return_prompt = “true” look at the returned prompt and see if you could come up with a better one by making changes to the very beginning and/or submit the prompts to different models (instruct series).
You’ll also want to be sure you’re using an Instruct series model if you add an instruction like "Only use the below documents.” or “Answer ‘I don’t know’ if the question is unrelated to the text”. This has worked well in my tests, but it is admittedly a tricky problem to manage. A more in-depth option would be to fine-tune a discriminator: Playbook: Fine-tuning for Truthfulness [External] - Google Docs.