Skip to main content

6 posts tagged with "ai"

View All Tags

Order Sensitivity in LLM Decision Models: The Flashlight That Became a Solar Calculator

· 11 min read
Manu Mishra
Distinguished Solutions Architect, Author & Researcher in AI & Cloud

Same decision, any order—Strands Gemma E2B

Imagine a product team alphabetizes a dropdown and the AI recommendation changes. The available choices are identical. Their meanings are identical. Only their display order moved, yet the model picks something else.

I saw a clean example while evaluating an LLM-based decision model.

Question

Which device directly converts chemical energy to electrical energy?

Choices

  • A solar-powered calculator
  • A wood-burning stove
  • A battery-powered flashlight
  • A wind-powered sailboat

A Strands Gemma E2B checkpoint selected the battery-powered flashlight—the correct answer—with an API-returned probability of 0.5589. I then reversed the same four choices. The checkpoint selected the solar-powered calculator with probability 0.5615.

Semantic optionOriginal orderReversed order
solar-powered calculator0.12240.5615
wood-burning stove0.12290.0967
battery-powered flashlight — correct0.55890.2873
wind-powered sailboat0.19580.0545

These columns are aligned by semantic identity: the solar calculator is compared with the solar calculator, regardless of which row displayed it. This was not an index-mapping error. The selected meaning changed. That flashlight became the starting point for a broader systems question: when choices are conceptually a set, why should display order affect the decision?

The pattern was wider than one model​

I applied the same treatment to four public decision models. Each received the same 3,900 questions twice: first in source order, then in complete reversal, meaning the last choice became first, the next-to-last became second, and so on. The question, context, and choice text stayed unchanged.

Tested modelAnswers changed after reversalOriginal-order accuracy
Laya1,426 / 3,900 (36.56%)49.49%
Strands Hobson839 / 3,900 (21.51%)72.13%
Strands Gemma E2B851 / 3,900 (21.82%)73.00%
Strands Gemma E4B563 / 3,900 (14.44%)79.26%

Before counting a change, the evaluator mapped both responses back to the original semantic choices. It asked whether the winning meaning changed, not whether the winning row number changed. All four models also returned zero failed or invalid responses, so the rates are not inflated by malformed output.

This comparison is evidence about these tested model releases, their native typed-choice interfaces, and the recorded runtime—not a claim that every LLM behaves this way. It also tests one transformation, complete reversal, rather than every possible permutation. Even within that bounded test, every jointly encoded model changed a meaningful share of its decisions. The most accurate model, Strands Gemma E4B, still changed about one answer in seven.

The full protocol and per-task results are in the immutable cross-model order-sensitivity evidence. That cross-model study was published after the v0.1.0 project release; it adds comparative evidence but does not change the released runtime or model components.

Project release: GitHub source, runtime, tests, and evidence (v0.1.0) · Hugging Face model components (v0.1.0)

Expectation Constructs: The Missing Primitive in Agentic AI

· 6 min read
Manu Mishra
Distinguished Solutions Architect, Author & Researcher in AI & Cloud

Expectation Constructs

I have built and reviewed enough agentic systems to notice a recurring gap. We have plenty of patterns for how an agent thinks and acts—ReAct, reflection, evaluators, swarms, orchestrators. What we don't have is a clean, shared unit of work that ties those patterns together. When an agent fails, the honest answer to "which part broke?" is usually a shrug. We rerun the whole thing and hope.

That gap is expensive. Without a defined unit of work, you can't judge success consistently, you can't bound retries, and you can't tell whether the agent produced the wrong thing or was judged by the wrong standard. You end up debugging vibes.

Universal Image MCP - One Server, Three AI Image Providers

· 5 min read
Manu Mishra
Distinguished Solutions Architect, Author & Researcher in AI & Cloud

Universal Image MCP Architecture

I use AI-generated images constantly—architecture diagrams, UI mockups, interface concepts, responsive design visualizations. Different models excel at different tasks, and I often compare outputs across providers to pick the best result.

The existing MCP servers I found had a common limitation: hardcoded model IDs. When providers deprecated models, tools broke. When new models launched, they weren't available until someone updated the code.

So I built Universal Image MCP—a server that fetches models dynamically from provider APIs. New models appear automatically. Deprecated ones disappear. No code changes required.

Rethinking API-First - Unveiling Its True Power in the AI Era

· 4 min read
Manu Mishra
Distinguished Solutions Architect, Author & Researcher in AI & Cloud

APIs, or Application Programming Interfaces, are the bedrock of today's digital economy. They form the communication conduits between diverse software systems, facilitating seamless interaction. With AI becoming a game changer in reshaping businesses across sectors, an API-first approach is emerging as a non-negotiable strategy. In this article, we take a deep dive into the API-first approach, particularly in the era of AI, demystifying its core prerequisites and exploring its game-changing impacts.

The Future with Large Language Models - A Technical Debt Worth Taking

· 6 min read
Manu Mishra
Distinguished Solutions Architect, Author & Researcher in AI & Cloud

The Emergence of Generative AI and Large Language Models​

The world has witnessed a meteoric rise in the use of artificial intelligence (AI) technologies over the past few years, with generative AI and large language models (LLMs) standing at the forefront. Generative AI, which includes the likes of LLMs, can generate creative and unique content, ranging from artwork to complex textual narratives. The idea of AI systems autonomously producing human-like content has transformed the AI landscape, opening up a plethora of possibilities.