discord-ai-bot icon indicating copy to clipboard operation
discord-ai-bot copied to clipboard

SYSTEM="" Is prompted as a literal reply to the user

Open xhyabunny opened this issue 11 months ago • 6 comments

SYSTEM prompt is replied to the user with no context even when asked not to.

To Reproduce Steps to reproduce the behavior:

  1. Write on SYSTEM="DO NOT WRITE THIS you are an assistant"
  2. Use the .env system by marking USE_SYSTEM as true and USE_MODEL_SYSTEM as false
  3. npm run
  4. If you say something that the bot doesnt recognice properly, they will start prompting what you asked them not to prompt

Expected behavior Bot using SYSTEM prompt as INFO on how to act

Screenshots image

Device

  • OS: Windows 10
  • Repo is latest (i downloaded as zip -> c6af204)
  • Ollama version 0.1.29 (windows preview)

xhyabunny avatar Mar 24 '24 06:03 xhyabunny

I experienced the same, however I think this is more due to the llm than the bot. If you use the bot system prompt feature, what is happening is just that you are sending that as a prompt, so there’s a chance that the llm will take it from the context window and spit it out.

I disabled the feature and instead rebuilt the model with my own system prompts using modelfiles, and since then I have never experienced this issue.

hermitbernard avatar Mar 24 '24 06:03 hermitbernard

okok tysm

xhyabunny avatar Mar 24 '24 06:03 xhyabunny

well i tried doing that but my bot now acts dry asf, like no personality at all, idk what that means

xhyabunny avatar Mar 24 '24 06:03 xhyabunny

It means you have to enrich the system prompt in the modelfile. Also make sure you set USE_SYSTEM_PROMPT=TRUE in the bot and that you are running the new model you just created.

hermitbernard avatar Mar 24 '24 07:03 hermitbernard

yeah

xhyabunny avatar Mar 24 '24 07:03 xhyabunny

what model are you using? some people have had issues with some models but llama2 seems to work for me

mekb-turtle avatar Mar 25 '24 05:03 mekb-turtle

I also cannot reproduce it (llama3). Closing for now

238SAMIxD avatar Jul 22 '24 13:07 238SAMIxD