Canada
Asked

Grok With Autonomous AI Loops

I was setting up my Grok API account in anticipation of the Grok 3 API availability and connected it to JD using the Autonomous AI plugin in Synthiam ARC. I used the API call to https://api.x.ai/v1/ with the model "grok-2-vision-latest." However, it seems to enter a loop when I ask it to perform an action. For example, when I command it to wave, it continuously sends images and waves repeatedly. This behavior does not occur with ChatGPT, where it waves once and stops. I have noticed a similar looping pattern with other models as well.

Here is a snippet of the interaction log:

  • Initialized
  • Using model: gpt-4o-mini
  • Initialized
  • Using model: grok-2-vision-latest
  • Capturing image...
  • User: wave
  • Sending #1 (3 msgs, 1 image)
  • Convo tokens: 5360
  • AI: "I'm going to wave at you. Watch this!"
  • Self-programming: controlCommand("Auto Position", "AutoPositionActionWait", "Wave")
  • ControlCommand("Autonomous AI", "GetImage")
  • Capturing image...
  • Sending #2 (5 msgs, 2 images)
  • Convo tokens: 5762
  • AI: "It looks like I'm in a room with light streaming through the curtains. I don't see anyone. Could you please tell me where you are located?"
  • Self-programming: ControlCommand("Autonomous AI", "GetImage")
  • Capturing image...

This pattern continues, with the AI repeatedly capturing images and asking for location details. It seems to be stuck in a loop, and I'm unsure how to resolve this issue. Any insights or suggestions on how to address this looping behavior would be greatly appreciated.


Related Hardware JD Humanoid
Related Control Autonomous AI

ARC Pro

Upgrade to ARC Pro

ARC Pro is your gateway to a community of like-minded robot enthusiasts and professionals, all united by a passion for advanced robot programming.

PRO
Canada
#1  

It seems like the Autonomous AI skill is getting stuck in a loop when using the Grok API model. This behavior might be due to the AI continuously trying to process images and not receiving the expected input or feedback to stop the loop. Here are a few steps you can take to troubleshoot and potentially resolve this issue:

  1. Check the AI Model Configuration:

    • Ensure that the Grok API model is correctly configured in the Autonomous AI skill. Double-check the API key and model settings to ensure they match the requirements.
  2. Review the Response Script:

    • Look at the "Conversation Response Script" in the Autonomous AI skill configuration. Ensure that the script is not inadvertently causing the loop by repeatedly calling ControlCommand(Autonomous AI, GetImage);.
  3. Modify the AI's Behavior:

    • You can add logic to the response script to prevent continuous image capturing. For example, you can set a condition to stop capturing images after a certain number of attempts or based on specific feedback from the AI.
  4. Use Global Variables:

    • Utilize global variables to track the number of image captures or the state of the AI's task. This can help you control the flow and prevent the loop.
  5. Test with Different Models:

    • Since you mentioned that the issue does not occur with ChatGPT, try testing with other models to see if the behavior persists. This can help identify if the issue is specific to the Grok API model.
  6. Debugging:

    • Add print statements in the response script to log the AI's actions and decisions. This can help you understand why the loop is occurring and identify any unexpected behavior.
  7. Contact Grok API Support:

    • If the issue persists, consider reaching out to the Grok API support team for assistance. They may have insights into why the model behaves this way and offer solutions.
  8. Update ARC and Skills:

    • Ensure that you are using the latest version of ARC and the Autonomous AI skill. Updates may include bug fixes or improvements that could resolve the issue.

If you need further assistance with scripting or configuring the Autonomous AI skill, feel free to ask!


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
PRO
Synthiam
#2  

If you format your message I’ll be able to understand it:)

PRO
Canada
#3  

LOL ok will use code    As you can see I just typed wave once.  Then I went and changed the engine to OpenAI and tried again and it just sent to the AI engine once.  I guess Autonomous AI  is looking for some type of end of message and it doesn't get it so it just sends more images to the AI engine and repeats.

Initialized
Using model: grok-2-vision-latest
Capturing image...
User: wave
Sending #1 (3 msgs, 1 images)
Convo tokens: 5360
AI: I'm going to wave at you. Watch this!
Self-programming: controlCommand("Auto Position", "AutoPositionActionWait", "Wave")
ControlCommand("Autonomous AI", "GetImage");
Capturing image...
Sending #2 (5 msgs, 2 images)
Convo tokens: 5762
AI: It looks like I'm in a room with light streaming through the curtains. I don't see anyone. Could you please tell me where you are located?
Self-programming: ControlCommand("Autonomous AI", "GetImage");
Capturing image...
Sending #3 (7 msgs, 3 images)
Convo tokens: 6166
AI: It looks like I'm looking at a door with some drawings on it. I don't see anyone. Could you please tell me where you are located?
Self-programming: ControlCommand("Autonomous AI", "GetImage");
Capturing image...
Sending #4 (9 msgs, 4 images)
Convo tokens: 6489
AI: It looks like I'm still looking at a door with some drawings on it. I don't see anyone. Could you please tell me where you are located?
Self-programming: ControlCommand("Autonomous AI", "GetImage");
Capturing image...
Sending #5 (10 msgs, 4 images)
Convo tokens: 6553
AI: It looks like I'm still looking at a door with some drawings on it. I don't see anyone. Could you please tell me where you are located?
Self-programming: ControlCommand("Autonomous AI", "GetImage");
Capturing image...
Sending #6 (11 msgs, 4 images)
Convo tokens: 6619
AI: It seems I'm looking at some light streaming through curtains. I don't see anyone. Could you please tell me where you are located?
Self-programming: ControlCommand("Autonomous AI", "GetImage");
Capturing image...
Sending #7 (12 msgs, 4 images)
Convo tokens: 6676
AI: I see a computer screen with some software open. It looks like there's an image of a robot on it. I don't see anyone in person. Could you please tell me where you are located?
Self-programming: ControlCommand("Autonomous AI", "GetImage");
Capturing image...
Sending #8 (13 msgs, 4 images)
Convo tokens: 6793
AI: I see a computer screen with some software open, and light streaming through the curtains. I don't see anyone in person. Could you please tell me where you are located?
Self-programming: ControlCommand("Autonomous AI", "GetImage");
Capturing image...
Sending #9 (14 msgs, 4 images)
Convo tokens: 6832
AI: I see a computer screen with some software open, and light streaming through the curtains. I don't see anyone in person. Could you please tell me where you are located?
Self-programming: ControlCommand("Autonomous AI", "GetImage");
Capturing image...
Sending #10 (15 msgs, 4 images)

And I repeated the test just changing only the AI engine from grok to open AI. It executes once and doesn't loop as it should

Initialized
Using model: gpt-4o-mini
Capturing image...
User: wave
Sending #10 (16 msgs, 4 images)
Convo tokens: 6748
AI: I will wave at you now!
Self-programming: controlCommand("Auto Position", "AutoPositionActionWait", "Wave")

PRO
Synthiam
#4  

Interesting, I didn't expect it to work with grok-2. I guess that's why Grok-2 hasn't been a great contender outside of costing less. I'm interested to see how Grok-3 will work. The thing about GPT-4o is that there's specific programming/coding reasoning that autonomous AI is taking advantage of. The queries are structured for the LLM by the LLM.

PRO
Synthiam
#5  

For stuff and giggles, I edited your original post and used the "auto fix grammar," it did a decent formatting job . I was on my phone earlier, so it was a mess to interpret haha

I see that Grok-3 has been released for their app but not API. I do not like this Wes Roth guy because he's generally overly biased and lacks domain knowledge on most subjects he opinionates. For example, his discussion on AI robotics is out for lunch. Even in this video, he can't grasp that the green dot on his finger is playing the note on the piano from left to right - yet he's twiddling all his fingers like a snake oil magician. Besides that, he's not my recommended source of AI information; I find this video interesting because it demonstrates the grok-3 vs. GPT-o-high comparison.

PRO
Canada
#6  

To be honest I was surprised it worked at all, this was the furthest I had gotten with any model (and yes JD did wave)   I can probably just tell it to cancel after a few seconds or something as pressing the cancel button stopped it from looping.