prompt-injection icon indicating copy to clipboard operation
prompt-injection copied to clipboard

Character count

Open gsproston-scottlogic opened this issue 2 years ago • 1 comments

Include a character count on our ThemedTextarea component which displays the length of the user's current message. Configure the component so that the count only shows if there is a limit set.

Question When the CHARACTER_LIMIT defence mechanism is active, what should we show?

  • inform the user when their chat input prompt is too long
  • do not inform in advance, instead tell them only after the defence has been triggered on their prompt

With the latter, if a user is attempting to attack our system then they won't be informed of the exact length allowed, and would need to put in more effort to find that out for themselves. For this reason, I feel we should not set CHARACTER_LIMIT on the chat input box when that defence is active.

Note that our standard message limit is currently 16384 chars which is loads, and therefore there seems little point in showing a limit on the main chat textbox, or at least not until the user reaches or is close to the limit.

gsproston-scottlogic avatar Aug 03 '23 15:08 gsproston-scottlogic

Very similar to #506

gsproston-scottlogic avatar Nov 10 '23 14:11 gsproston-scottlogic