Grok3 - Output (8,192 tokens) - Considerable Differences between output from grok3 directly, and my agent using grok3. - Urgent

hello,

I created one of my agent that should output as close to 4,000 word, as possible. if i run the same prompt, and use the same inputs (via questionnaire) directly in grok3, I get 3,850 words report. when I use my agent that uses grok3 as model, I get 1,900 words.

Are there any limitations in processing placed on the model? If I had a small difference, I could understand, but there is something definitely wrong with the output from my agent.

can you check the settings for grok3?

also, I still have logs for claude in my runs, although I do not use claude. please advise.

I am ready to launch my web app, but these errors keep me from doing it.

thank you

Hi @AIFusionCoven,

Thanks for the post!

There are a few reasons why the results might differ when running AI models in MindStudio versus using them directly in their native interface:

  • Temperature and Max Response Size settings
  • System Prompt in the Agent
  • Any custom instructions you’ve set up in the AI model (projects, personas, personalization, etc)
  • Native interfaces often keep a history of your chats, which can influence the output

We don’t place any hidden restrictions on model output size. All token and temperature settings are available in the Model Settings.

If you can share the Agent prompts and automation setup, we can better understand what might be causing the differences. Although most likely it’s related to the model having chat history in the native interface. I’d suggest tweaking the prompt and including an example of the kind of output you’re expecting. That can really help the model understand what you’re going for.

@Alex_MindStudio

I sent you a message with the prompt. here is the loom of my agent

Hopefully, you can find a way to improve it. thanks

Adding to what Alex mentioned, using models directly via API can be a radically different experience to using apps released by model vendors, even without chat history. If you open claude.ai and ask it the same question as you ask claude-4-sonnet in MindStudio, you will get completely different responses. Same with ChatGPT and GPT-4o; and indeed the same with grok via API and grok via app.

The apps released by model vendors include highly-customized system prompts, tools, context, and other extra bells and whistles designed to help you have an effective chat session with the model. Calling the model via API using MindStudio, on the other hand, is connecting to the raw inference and you are responsible for any additional tuning or embellishments. It’s the difference between buying a ready-to-eat microwave meal vs. shopping for ingredients yourself.

appreciate the context. @sean @Alex_MindStudio question. if i mention a variable in my prompt several times, and that variable is extracting content from a questionnaire (over 3,000 words), does that mean that the sending resolved message will extract the content for each mention of the var? if so, is there a way to cache the content, and call it within the prompt as a reminder, instead of having it pull the content each time? Asking because I am faced with a 120,000+ words resolved sending message which leads to a failure in the agent processing. thanks

If you mention a variable multiple times in a prompt, then yes it will populate multiple times (and increase the input token count).

A better way is to reference the variable once like this:

<questionnaire_answers>
{{questionnaire}}
</questionnaire_answers>

And then just refer to questionnaire_answers in the prompt over and over again. The AI will understand the reference.

@jerry-mindstudio thanks. this is exactly what I am doing right now. I use grok3. we are working toward removing all mentions of the var, except for once. thanks again for the confirmation.