openai-cookbook
openai-cookbook copied to clipboard
add caveat around prompt injection.
Documentation for https://github.com/openai/openai-cookbook/issues/157
- adds similarity score threshold for ensuring enough relevant context is in the embeddings database before requesting a completion.
- adds an example cell where the similarity threshold is not met.
- adds an example cell of how one could co-opt the Q&A app by supplying relevant context to the prompt then injecting a negation statement.
I'm doing a full rewrite of the example and I'll include some of the changes you suggest.
Sounds good thanks!
I rewrote the example and included a prompt injection example, as you suggested: https://github.com/openai/openai-cookbook/blob/main/examples/Question_answering_using_embeddings.ipynb
Will close this PR. Cheers.