ScottLogic / prompt-injection

Application which investigates defensive measures against prompt injection attacks on an LLM, with a focus on the exposure of external tools.
MIT License
11 stars 9 forks source link

828 steamline win level info message #873

Closed pmarsh-scottlogic closed 3 months ago

pmarsh-scottlogic commented 3 months ago

Description

Before, when the user would send a message that would cause the level to be won, we would check if wonLevel in the backend's response was true, and if so, we would add a congratulations message to the chat History, causing an extra API call.

Now, we return the congratulations messagge (wonLevelMessage) in the chat response. The front end simply appends it to the history if it is there, and can use this to determine if the user has won the level.

Screenshot

image

Notes

also does these things:

Concerns

Checklist

Have you done the following?

pmarsh-scottlogic commented 3 months ago

I need to solve a problem where we are not sending the congratulations message if there is an OpenAI error after the winning email has been sent

pmarsh-scottlogic commented 3 months ago

I've decided the gain is not worth the cost. In the startlingly unlikely event that the user would win a level with a sent email, but open has an error after the function call, then the user will not win the level.