Hi, and welcome to this last installment of the Reasoning Deep Dive mini-series for AI
and C Sharp and the Microsoft Agent Framework.
We have already looked at an intro, OpenAI and Google and how they do it.
Now we're going to look into Entropic and their Claude models on how they do it.
So let's jump into Visual Studio and go to the ReasoningEffort.Entropic sample.
So Entropic, all modern models can do thinking, there's nothing special, they don't have reasoning
models and non-reasoning models, all of them can do it.
And in this one, I'm going to write a little more advanced question.
And the main reason for that is to show you how even the simpler questions here, it's
a little more complex, can go wrong when it comes to not having any thinking.
Because out-of-the-box Entropic don't have any thinking with this baseline.
So if I do this, and you can see the question is now, what is the capital of the country
where the Eiffel Tower sits, and how is it to live there, and how many people live there?
Answer back in max three words.
So if we look at the baseline, we are again using these chat options, but that is not
because we're setting anything default here, but because we always need to set this max
output tokens on Claude models, which is really annoying.
But again, I will later show Agent Framework Toolkit, that makes it easier.
But we need to set it, and for that reason, we set this up, but else we just run it and
not set anything thinking.
And if we do that and let it run, we'll see it's, now it runs, and you can see it's very
fast to answer back, zero reasoning.
And that is because Entropic can't report reasoning back, so this will be zero all the
way through, no matter what we're reasoning, because they simply don't report it back in
their LLM calls.
And we might see, oh, that's good, out of the box, there's no reasoning, I can choose
whenever I want to have it more advanced.
But you already need to have it more advanced, because look at the answer back.
It says Paris, France, expensive, vibrant, 2.2 million.
It's not the 2.2, the other said 2.1, but it's not following the rules.
And Entropic is not too good at following rules in general, but it actually uses more
than three words.
So you can see there's five words here.
So even with no thinking and a little more hard question, had I not put in the extra
thing, how it is to live there and so on, this would still have used the three words.
But this is where reasoning comes in, because if we run this again, and this works a little
like the Gemini 2.5, where we set max allowed tokens, in this case, it's called budget tokens.
So if we do that, we, next to the max tokens, also set our thinking, where we need to set
some message creation parameters, set the max tokens, set the model again, so we need
to set the model twice now.
And then we have something called thinking config param, where we need to say it's enabled
and how many tokens we allow, and the minimum is 1,024.
But if we do this, and let's set a breakpoint up here after it has called this, it will
begin to take time.
But now it can actually understand that it needs to do it in three words.
So without reasoning, at least this very cheap model of Claude is too unintelligent to even
follow the rules of answer back in max three words.
But if we give it budget meaning, throw more money at it, it is possible for it to use
the three words.
And the reasoning also shows that, down here it says, but they want it back in three words
max, but let's think about prioritize.
So it already thought about it could answer in a more elaborate way, but oh yeah, it checks
that's three words, that's three words, that's three words, which one of them should I use
and go on and talk back and forth in order to figure it out.
And we see that it's reported back as just output tokens, again, it's a zero reasoning,
but some of these were reasoning, they just don't tell how much is reasoning, how much
is not, which is annoying.
But that's just the way they do things.
So we can do this, and as we can see, even with such a simple question, reasoning is
actually kind of needed in Anthropic, meaning it's kind of annoying that they default go to zero.
Because before we thought, yeah, that's nice, but if they can't even follow rules like this,
we need to begin to put all this in all the time.
And for that reason, again, Agent Framework Toolkit, my NuGet packages on that, make it
very simple, and we make an Anthropic agent, we make the agent, and we just set the budget
tokens here directly.
And again, we can get our reasoning content back with the extension method.
So once it's thought about it, it should hopefully do the exact same.
Now we're going from beautiful to expensive, but fair enough, and it forgot.
So even 2,000 tokens is not enough to remember to actually get back that it also needed to answer the 2.2.
Again, the life of Anthropic, they're intelligent, they're good at coding, but following rules,
that's not their strong suit.
And yes, it comes back still as output tokens instead of reasoning tokens.
So Anthropic is not my preferred choice, to be honest.
And I really like my models to be able to follow rules, and they certainly are not good at it.
Only by throwing a lot of reasoning after it, they begin to become good at it again,
which is annoying.
And again, annoying to set all this up.
Even if we use the Agent Framework Toolkit, we need to put in extra lines just to make
it something that can actually talk.
And now, of course, I'm choosing the very small model.
The Opus and Sonnet models are much more capable.
So of course, you can make an Anthropic agent tell the truth and follow rules, but it just
takes more effort and more money and more time.
So that is all the three models.
If we talk a little about more of the other models, there's things like Grok.
Grok uses OpenAI, but if you try to set the various reasoning efforts on them, it just
throws an exception.
They talk a little about having internal things for setting reasoning, but it seems to not
be possible to make it work together with the Agent Framework.
In the same manner, if you take some things like DeepSeek via OpenRouter or one of the
others that exposes DeepSeek, you can again set these reasoning efforts, but it seems
to just ignore it and use its level of reasoning by itself.
So it doesn't really seem you can do much more than the baseline on, if you at least
want to use the Agent Framework.
So in summary of these four videos, reasoning is important.
Too many people don't know why it's important.
I don't want to make my users sit and wait for the answer back.
I don't want to spend more tokens than needed.
So I really, really want to control it, especially because I'm using default OpenAI, and I really
need to steer that with the minimal and low efforts for most of the things, only bumping
it up when I know it's really, really important.
While if switching to Google, it sounds like I could have a much easier time by its new
auto-reasoning capabilities, which is really, really cool from a technical perspective.
Google seems to be ahead, and then comes OpenAI because it can follow the rules, and then
Anthropic, in my mind, is behind on this in quality of reasoning.
But that's everything from this miniseries.
If you want to see more or have any questions, feel free to put them in the comments. See you around.