art-from-the-machine / Mantella

Mantella is a Skyrim and Fallout 4 mod which allows you to naturally speak to NPCs using Whisper (speech-to-text), LLMs (text generation), and xVASynth / XTTS (text-to-speech).
https://art-from-the-machine.github.io/Mantella/
GNU Affero General Public License v3.0
186 stars 44 forks source link

Force NPC actions for certain keywords #220

Closed art-from-the-machine closed 2 months ago

art-from-the-machine commented 7 months ago

Some LLMs struggle to follow instructions written in their prompt, including the Follow, Offended, and Forgive actions. If players experience issues with LLMs calling these actions themselves, they should be able to manually trigger these actions. This can be achieved by explicitly calling actions for hard-coded player inputs.

This is already done for the "goodbye" keyword, where if the player has this keyword in their response, an action is made in the code to end the conversation. This functionality can also be extended to NPC actions. If the player simply says eg "follow" (and nothing else), then the Follow action should be triggered regardless of what the LLM outputs. This can work around situations where the LLM has forgotten what is written in the starting prompt.