tarasglek / chatcraft.org

Developer-oriented ChatGPT clone
https://chatcraft.org/
MIT License
155 stars 36 forks source link

Free 7b models need to be told to think better in system prompt #509

Open tarasglek opened 8 months ago

tarasglek commented 8 months ago

The following addition to system prompt makes free models way smarter and actually useful.

tarasglek commented 8 months ago

openai gpt gets annoyingly more verbose with that, but can counteract it with following combo..this still gets excellent results on 7b too

tarasglek commented 8 months ago

@humphd what do you think about adding these 2 bullets to chatcraft default prompt?

humphd commented 8 months ago

I would remove them from the default prompt if they were there, so I'm not sure. This feels like personal, system prompt customization to me.

tarasglek commented 8 months ago

try using the free models with/without and get back to me :)

humphd commented 8 months ago

That's my point, I don't use the free models, so adding this to my default system prompt sucks.

humphd commented 8 months ago

Thinking about this more...let's update the code in https://github.com/tarasglek/chatcraft.org/blob/main/src/lib/system-prompt.ts so that if we're using the default provider, we add extra bits to the system prompt. This way we can better target the use case we care about.

tarasglek commented 8 months ago

I remember last time we had code like this I ended up with a lot of weird looking system prompts.

my other thought was to hack it serverside

humphd commented 7 months ago

That's perhaps cleaner. Can we have multiple system prompts in a chat? If so, you could inject a second one to do this before sending to openrouter.

tarasglek commented 7 months ago

Here is another prompt hack https://discord.com/channels/1078625661620592721/1121489946004430949/1222030693551439914 in this vein