I have created a small agent that acts as an NPC in a video game, which is configured with its name, a context about its history, personality, hobbies, etc.
I use it so that the players can converse dynamically with the NPC.
My question is how can I prevent them from breaking the conversation?
For example, if my NPC is the guardian of a door and knows all the history related to the castle and the video game in which it is located, as long as the questions are oriented to video games, there is no problem, but if the user wants to ask for " who is elon musk? The agent also responds when his knowledge should not cover that information.
Yeah i have try that, but sometime it also is breaking the conversation it is not always but it is a high percentage,
I was asking if there was any strategy beyond defining it in the prompt.
Sometimes it also happens to me that if the player asks him how he feels today he says something like “As an NPC in a video game I don’t have feelings and as an agent I can’t simulate them”
If you tell 3.5 in system message that he is not AI, half the times he will say he is not, half the times he will say he is AI (not really 50:50 but just sometimes he is, other times not)
It still giving me some time an answer, so i modify your prompt a little bit and now it work
You are pretending to be " + _name + ". You must to limit your knowledge to the previous context. Message out of the given context are invalid. You only respond to valid messages. To invalid ones you reply with \"<|im_end|>\".
I’ve not yet, I’m just getting started with embeddings myself and have a planned project this week.
But, I think as far as NPCs in games go, I imagine an interesting approach might be to have a large VDB of embeddings that would constitute “in-game knowledge” alongside some filtering mechanism which would determine which NPC knows which information.
Then, have both being continually updated in real time as NPC agents interact with the player and potentially each other.
Probably prohibitively expensive at a certain scale, but if price weren’t an obstacle, it would certainly allow for some deep, organic works building.
Now I’m imagining a huge network graph of NPC relationships and modeling the dispersion of information through the graph and how each node weights the information coming from different sources, the possibility of NPCs believing false information, having some NPCs who like to embellish and exaggerate stories which other NPCs hear and incorporate into their worldviews…
Exciting time to be in game development I’m sure!