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.
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…