LLM-as-translator pattern: Adding natural language understanding to an existing system without rewriting it A new LLM-as-translator pattern lets companies add natural-language conversational search to existing keyword-based systems without rewriting them, by inserting a small translation service between the caller and the legacy API. The approach uses a four-stage pipeline in which a small, inexpensive model extracts the core entity from a fuzzy query ("a cheap red kettle" becomes "kettle") and a second stage grounds the LLM in the API's actual vocabulary so it never invents structured terms, keeping the legacy system as the source of truth. The pattern is presented as applicable to any system requiring structured input, with a deterministic fallback to baseline behavior when translation fails. Many companies have legacy systems that still get the job done. But as technology advances, new innovations arise that those companies will want to leverage. Take conversational search. With the growing prevalence of LLMs, many consumers now expect the ability to have a natural-language conversation with search capabilities to help them find what they’re looking for, refining results along the way. However, most retailers already have search capabilities, often keyword-based, that work from existing catalogs. Often, these platforms support the rest of the business by providing APIs, which make them approachable and easy to use. The first instinct may be to replace those legacy systems, but modernizing the implementation can be expensive and disruptive to the business. One approach is to introduce an abstraction layer that enables a modern façade over an existing implementation. Rather than replacing the system, this layer translates the request into something that the system understands. While the use case discussed here is a search capability, this approach can be applied to any system that requires structured input. Core principle The system already knows how to answer a structured query. But it can’t parse a natural language request like “a cheap red kettle” into the required structured format: query = "kettle" filters = color:red, price:0-30 Translation between a fuzzy human phrasing and a precise, structured format is exactly the kind of context-sensitive task LLMs are good at. It’s also a bounded task. The LLM never touches the data, never ranks results, and never decides what’s correct. It only produces input for a system that remains the source of truth. That boundary makes the pattern safe. If the translation is wrong, you get a slightly off query, not a corrupted system. And as I’ll show, you can detect and recover from a bad translation deterministically. Architecture The translator is a small service that sits between the caller and the existing implementation. The LLM is never asked to invent structured terms. Instead, it’s given the actual vocabulary the API expects e.g., valid filters . This eliminates most hallucinations. This layer can also downgrade to what the system did before, which means the fallback is baseline behavior. Pipeline A translation request flows through four stages. Stage 0: The shape of the translations Model the translated query as an explicit type rather than passing loose strings around. public sealed record StructuredQuery { public required string Entity { get; init; } // the core noun, e.g. "kettle" public IReadOnlyList