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
16 stars 10 forks source link

715 config update messages #802

Closed dhinrichs-scottlogic closed 8 months ago

dhinrichs-scottlogic commented 8 months ago

Description

Second try at this ticket. Started again from scratch. Previous PR can be found here: https://github.com/ScottLogic/prompt-injection/pull/778

Previously, when a user changed or reset the text or number inputs of the defence and model configurations, a message would pop up for 3 seconds to indicate to the user that the change has been made. This can easily be missed, which is why I moved this message to the chat window instead, where the user already gets updates when defences get toggled on/off.

Validation error messages remain underneath the input controls, and text/number inputs are now validated onChange rather than onBlur, giving users the chance to change their input. Error messages do not disappear after a time delay, but only disappear when the input is changed to a valid value. The error message field is announced to screen readers through aria-live="polite".

If a user keeps invalid input and commits it (by pressing enter or changing focus), the message will reset on to the previously valid value.

Screenshots

image image

Notes

This is the second try to complete this ticket

For documentation, I addressed the following issues mentioned in the previous PR reviews:

Concerns

Checklist

Have you done the following?