This is for use in VR where space is important, and we’re trying to teach the AI through the system prompt about the 3D coordinate system used by game engines. We provide the list of all the objects in the environment with their coordinate and ID for each object.
We want Completion API to find these objects according to the position where they’re placed in the world relative to a player. Ex: ‘what’s in front of me’ should get ChatGPT to return the object ID in front of the user by performing vector calculations. We provide the list of positions of the players and objects.
Here’s what we’re currently doing yielding mixed results (50% of the time it works).Current steps:
- Fetch the position of the player from the prompt
- Calculate the direction the player is looking at and calculate FOV
- Create a list of all the objects which are in the FOV
- Calculated the distance of all the objects and save the distance in the same list
- Choose the object desired by the user according to the distance calculated
We’re not sure where this fails. When we analyze the distance calculations it seems to generate the right distances, but for some reason the system still chooses the wrong object relative to the user asking for it.
Can anyone think of a better system or how to optimize this?