Peter Sergeant creates LLM-based non-player characters (NPCs) for a popular online game and wrote this insightful article describing how to leverage chain-of-thought (CoT) prompting to helping keeping LLM-generated responses under control.

 If — like us — you want to use an off-the-shelf model, this is a big freakin’ problem. The LLM already has a strong, everyday association with how “endurance” should relate to the gym, has strong opinions on whether or not a boomerang is a “throwing weapon”, and is quite convinced that Lithuania is a real place with fun things you can do there. In order to do what we want, we need to explain an awful lot about our constrained reality first!