Why LLM Systems Need Two Kinds of Intelligence: Construction and Retrieval
Hatched by Ante Gojsalić
Jul 14, 2026
10 min read
2 views
88%
The Hidden Mistake in Most LLM Products
What if the biggest mistake in building with language models is assuming that one clever model call can do the work of an entire system?
That assumption is seductive. A prompt looks elegant. A chain feels simple. An embedding API sounds like magic: just turn text into vectors and let similarity search do the rest. But real products rarely fail because they are too complicated. They fail because they confuse interface simplicity with system simplicity.
A useful LLM application is usually not one intelligence, but two working together: one intelligence for construction, which organizes prompts, tools, and logic into a workable pipeline, and another for retrieval, which decides what knowledge should enter the pipeline in the first place. If you miss either one, the result is brittle. If you overuse the wrong one, the result is expensive. The deeper question is not whether LLMs can reason. It is: how do we design systems that know when to think, when to search, and how to connect the two?
That is where the real tension lives. The visual, drag and drop world of chain building makes application design feel immediate and intuitive. The retrieval world, by contrast, is statistical, noisy, and budget constrained. One side invites composition. The other side imposes discipline. Together, they form a more mature way to build with language models.
From Prompt Craft to System Craft
The simplest LLM application looks almost toy-like: a PromptTemplate, an LLM, and an LLMChain. Drag them onto a canvas, connect them, and suddenly you have something that can chat. That simplicity is not trivial. It lowers the cost of experimentation and makes the structure of a language application visible. Instead of hiding logic inside scattered code, the system becomes inspectable.
This matters because many teams still treat prompt engineering as if it were a kind of sorcery, when in fact it is closer to interface design. A prompt is a contract. A chain is an assembly line. A visual builder turns the contract and the line into a map you can reason about.
But a chain alone is only half a product. A chain can transform input, yet it cannot guarantee that the input is worth transforming. The system needs a way to decide what information should be brought in, filtered, ranked, or excluded. That is where embedding APIs and retrieval pipelines enter the picture.
Think of a chain as a chef and retrieval as the pantry. The chef can prepare a great meal only if the pantry contains the right ingredients. A beautiful recipe cannot rescue stale produce. Likewise, a brilliant prompt cannot rescue irrelevant context. The quality of retrieval quietly sets the ceiling for everything downstream.
The most important model in an LLM application is often not the model that speaks, but the model that chooses what gets to be heard.
That reframing is crucial. We usually celebrate generation because it is visible. Retrieval is less glamorous because it works in the background. Yet retrieval is the difference between a fluent answer and a fluent hallucination.
Retrieval Is Not Just Search, It Is Decision Making
It is tempting to think of embeddings as a smarter version of keyword search. That is too small a view. In practice, retrieval is a decision layer. It decides what evidence the system is allowed to consider, what neighborhoods of meaning are close enough to matter, and what tradeoffs to make between precision, recall, and cost.
The evaluation of embedding APIs in realistic retrieval settings reveals a subtle but important lesson: using embeddings as a first stage retriever is not always the best move. In many cases, reranking BM25 results with semantic embeddings delivers better performance, especially in English and under budget constraints. For non English retrieval, the picture changes again, with hybrid approaches often winning despite higher cost.
This is not just a technical footnote. It is a reminder that “semantic” does not automatically mean “better at every stage.” The right role for embeddings depends on the retrieval architecture around them. Sometimes they should cast a wide semantic net. Sometimes they should act as a judge after a lexical system has already done the first pass.
That distinction is easy to miss because people often ask the wrong question. They ask, “Which embedding model is best?” when the better question is, “What job should the embedding model do?”
A first stage retriever has to find candidate documents fast and broadly. A reranker has to discriminate among already plausible candidates. These are different cognitive tasks. In human terms, one is like a librarian using the card catalog to locate a shelf. The other is like an editor deciding which of ten promising drafts is actually publishable.
The practical implication is profound: retrieval systems are multi stage arguments, not single model calls. BM25 contributes lexical certainty. Embeddings contribute semantic flexibility. Reranking contributes judgment. The best systems do not worship one method. They choreograph them.
The Real Architecture Problem: Choosing the Right Failure Mode
Every LLM system fails somewhere. The question is not whether failure occurs, but what kind of failure you can tolerate.
A pure semantic retriever may miss exact terms, legal references, product codes, or multilingual nuance. A pure lexical retriever may miss paraphrases, synonyms, and conceptual matches. A chain that is too simple may be easy to understand but brittle in practice. A chain that is too clever may become opaque and expensive.
This creates a design choice that resembles engineering in any constrained environment: you are not optimizing for perfection, you are optimizing for acceptable failure.
Consider a customer support assistant for a global software product. If a user in French asks about a specific billing error, a lexical search may miss the relevant policy page because the wording differs. A semantic retriever may find the right article, but only if the embedding model has enough multilingual competence. If the system first uses BM25 to gather likely documents and then reranks them semantically, it can preserve exact term matching while still capturing meaning. That is a practical compromise, not a theoretical elegance.
Now add a visual builder on top. Suddenly the team can see the shape of the system. They can inspect where prompt templates are inserted, where models are called, where retrieval enters, and where outputs are chained forward. That visibility changes behavior. It makes teams more likely to ask: Which stage should be deterministic? Which stage should be probabilistic? Which stage should be expensive?
These are the questions that separate demos from durable products.
Good LLM architecture is less about maximizing intelligence everywhere and more about placing intelligence where it adds the most leverage.
That is the synthesis. Construction tools make intelligence composable. Retrieval tools make intelligence grounded. The mature system is not one that always uses the strongest model first. It is one that uses the right method at the right stage.
A Mental Model: The Three Gates of an LLM System
A useful way to think about LLM products is through three gates.
1. The Composition Gate
This is where prompts, chains, agents, and model calls are assembled into a workflow. The question here is: Can the system express the task clearly? Tools like visual chain builders help make this gate explicit. They reduce accidental complexity by turning logic into visible components.
2. The Candidate Gate
This is retrieval. The question is: What information deserves consideration? Here the system decides whether to rely on lexical matching, semantic embeddings, or a hybrid. The most important constraint is not beauty, but coverage at reasonable cost.
3. The Judgment Gate
This is reranking, filtering, and final generation. The question is: Given the candidates, what should survive? At this stage, semantic models can serve as discriminators rather than discoverers. That often improves quality because the model is no longer searching the universe, only evaluating a shortlist.
This three gate model helps explain why many teams get inconsistent results. They spend all their attention on the final generation step, when the real leverage may be upstream in retrieval design or workflow composition. A brilliant answer cannot compensate for a bad candidate set. A perfect candidate set cannot compensate for a chaotic chain. Each gate has its own failure mode, cost profile, and role in the final product.
The beauty of this model is that it turns vague architecture debates into concrete questions:
- Is the problem really prompt wording, or is it candidate selection?
- Do we need more semantic breadth, or just better reranking?
- Is the system failing because the model is weak, or because the pipeline is ill formed?
Once you ask those questions, the path forward becomes much clearer.
Why Budget Is an Architectural Variable
One of the most underappreciated ideas in LLM systems is that cost is not separate from quality. It is part of quality.
A retrieval system that performs well but burns too many tokens or too much latency is not truly good for production. Likewise, a chain that works on a tiny demo but becomes unmanageable as components grow is not a maintainable design. The evaluation of retrieval APIs makes this especially concrete: reranking BM25 results with semantic APIs can be budget friendly and effective, while hybrid methods may improve performance at a higher cost.
That tradeoff should not be treated as an afterthought. It is an architectural decision. If the system is meant for high volume search, every extra embedding call matters. If the system is multilingual and accuracy sensitive, the extra cost may be justified. If the domain is narrow, a lexical backbone with semantic reranking may offer the best return on investment.
This is where mature builders distinguish themselves from enthusiasts. Enthusiasts ask, “What is the most powerful setup?” Mature builders ask, “What is the cheapest setup that meets the reliability bar?” That shift in perspective is essential because LLM products are not just software. They are economic systems. Every architectural choice creates a recurring bill.
A visual development interface helps here too, because it allows teams to inspect the cost of complexity. When a chain gets longer, or a retriever gets more layered, the design is no longer abstract. It becomes inspectable, debuggable, and therefore governable.
Key Takeaways
-
Treat retrieval as a decision layer, not a utility. The system is deciding what evidence the model gets to see. That choice shapes the answer as much as the prompt does.
-
Use embeddings for the right job. Semantic search is powerful, but it is not always the best first stage retriever. In many cases, reranking lexical candidates works better and costs less.
-
Design in stages, not in miracles. Break the system into composition, candidate selection, and judgment. Each stage has a different purpose and different failure modes.
-
Make the architecture visible. Whether you use a visual canvas or disciplined modular code, expose the structure of the chain. If you cannot inspect the workflow, you cannot improve it reliably.
-
Optimize for acceptable failure, not abstract perfection. A strong LLM product is one that fails in predictable, manageable ways while staying accurate, affordable, and maintainable.
The Deeper Lesson: Intelligence Is a Pipeline, Not a Point
The most important insight here is that LLM systems should not be imagined as a single thinking entity. They are pipelines of constrained intelligence. Some parts organize. Some parts retrieve. Some parts rank. Some parts generate. Each stage is weaker than the fantasy of an all knowing model, but stronger in combination than any one stage alone.
That is why visual chain builders and embedding based retrieval are more connected than they first appear. One gives you a way to shape thought. The other gives you a way to ground thought. Together they answer a central design problem of the age: how do we build systems that are flexible enough to speak, but disciplined enough to know what to say?
The answer is not to ask a model for everything. It is to build an architecture that earns the right context before it speaks.
Once you see that, LLM development stops being a contest of prompt cleverness. It becomes an exercise in systems judgment. And that is a far more powerful place to be.
Sources
Hatch New Ideas with Glasp AI 🐣
Glasp AI allows you to hatch new ideas based on your curated content. Let's curate and create with Glasp AI :)
Start Hatching 🐣