Andrej Karpathy's Pelican and the Question AI Can't Quite Answer

A single tweet from Andrej Karpathy — one of the most respected voices in deep learning — stopped a significant chunk of the AI community in its tracks. The subject? A pelican. The implication? Something much more uncomfortable about the state of modern AI systems.

Karpathy's observation, stripped to its core, probed whether a large language model truly understands something as visually and conceptually straightforward as a pelican — or whether it is doing something far shallower: retrieving statistically likely tokens that sound like understanding. It is a deceptively simple test, and that simplicity is precisely what makes it so sharp.

The Pattern-Matching vs. Reasoning Divide

This debate is not new, but Karpathy's framing gave it fresh traction. The central tension is this:

  • Pattern matching — the model has seen millions of sentences about pelicans, birds, beaks, and fish. It can produce fluent, accurate-sounding prose about all of them.
  • Reasoning — the model can take novel constraints, hold them in working memory, combine them with world knowledge, and arrive at a correct conclusion it has never seen verbatim before.

Current transformer-based LLMs are extraordinary at the first. They are inconsistent — sometimes spectacular, sometimes embarrassingly wrong — at the second. Ask a model what happens if you put a pelican in a sealed room with a fish tank, and it will often give you a confident, plausible-sounding answer that quietly violates basic physical or biological logic.

This inconsistency is not a bug waiting to be patched. It reflects something architectural: attention mechanisms are very good at relating tokens to tokens, but they do not maintain a persistent, grounded world model the way a human brain does.

Why Senior Engineers Should Care

If you are building a product on top of an LLM — a copilot, a document Q&A system, an autonomous agent — this distinction has direct engineering consequences.

Retrieval-Augmented Generation (RAG) partially addresses the knowledge grounding problem, but it does not fix reasoning chains. You can give a model every document it needs and it will still occasionally hallucinate a step in multi-hop logic.

Chain-of-thought prompting helps. Forcing the model to externalise its reasoning steps catches some errors before they compound. But chain-of-thought is also gameable — the model can produce a confident-looking chain that leads to a wrong answer, especially when the correct answer would require the model to say "I don't know."

Tool use and structured output are currently the most reliable mitigations. When you constrain the model to call deterministic functions — a calculator, a database query, a rules engine — you stop asking it to reason and start asking it to select, which is where it genuinely excels.

# Instead of asking the LLM to compute, let it select the right tool
tools = {
    "calculate_volume": calculate_volume,
    "lookup_species_data": lookup_species_data,
    "check_constraints": check_constraints,
}

response = llm.chat(
    messages=messages,
    tools=list(tools.values()),   # LLM selects; Python executes
)

This pattern — LLM as orchestrator, deterministic code as executor — is rapidly becoming the standard architecture for reliable AI features in production.

The Broader Lesson for SaaS Founders

There is a product strategy embedded in Karpathy's seemingly casual observation. The founders who will build durable AI-powered products are not the ones who trust the model to do everything. They are the ones who understand exactly where the model is brittle and design their systems accordingly.

That means:

  • Scoping tasks to the model's strengths. Summarisation, classification, drafting, and semantic search are well within the reliability envelope. Open-ended multi-step deduction often is not.
  • Building evaluation pipelines early. You cannot know where your model fails until you measure it systematically. A simple eval suite — even 50 curated edge cases — will surface failure modes that no amount of demo testing will reveal.
  • Treating the model as a probabilistic component, not a deterministic one. Every output carries a confidence distribution, even when the model does not express one. Your system architecture should reflect that uncertainty with fallbacks, human-in-the-loop checkpoints, or confidence thresholds.

What Comes Next

The research community is actively working on the reasoning gap. Neuro-symbolic hybrids, process-reward models, and test-time compute scaling (letting the model "think longer" before committing to an answer) are all live research directions. OpenAI's o-series models and Google DeepMind's Gemini Thinking variants are early commercial bets on the test-time compute approach — with genuinely promising results on structured reasoning benchmarks.

But benchmarks and real-world deployments are different animals. A model that scores well on GSM8K may still confidently mis-classify a pelican scenario that a ten-year-old would find trivial. The gap between benchmark performance and robust general reasoning remains one of the defining open problems in AI.

Karpathy's tweet matters not because it is a takedown of LLMs — he is one of their most thoughtful advocates — but because it is an invitation to be precise. Precise about what these models do well, precise about where they fail, and precise about how we build systems that are honest about the difference.


Why this matters for your project: If you are integrating AI into a product at Code!nk Technologies or anywhere else, the pelican problem is your architectural problem too. Design your AI features around the model's genuine strengths, wrap brittle reasoning steps in deterministic guardrails, and invest in evals before you invest in scale. That discipline is what separates products that impress in demos from ones that hold up in production.

Source: Andrej Karpathy on X (Twitter) — https://twitter.com/karpathy/status/2083749667410727319, as surfaced on Hacker News.