Michael Schmuklermann
← All cases

AssetClassics

Agentic matching of car listings to a vehicle taxonomy

A custom Python pipeline that maps messy car listings to an internal taxonomy: similarity matching and a hierarchical neural network decide the clear cases, and LLM agents resolve the ambiguous ones from the description, check each other, and route the rest to human review. Built without an agent framework, so every step is plain, testable code.

OrchestrationCustom Python · staged pipeline with agent steps
StackPython · Pydantic · PyTorch · OpenAI · BigQuery · Cloud Run · Retool
How it runs

In short

AssetClassics tracks the classic-car market, and every listing has to be assigned to the right make, model, generation, and variant in an internal taxonomy. Listings come from many sources with inconsistent names like "991 SPEEDSTER 4.0 CARBO-LIFTING-NAVI". I built a staged prediction pipeline on Cloud Run and BigQuery that resolves them. Cheap deterministic steps go first: a similarity matcher with fuzzy and Jaccard scores plus custom rules, then a hierarchical neural network that predicts make, model, family, and variant in order. Only when no candidate clearly wins do the agent steps start. A description agent reads the listing text and compares the remaining taxonomy candidates using tools: taxonomy lookup, year-range check, and candidate comparison. A verifier agent checks the decision against hard rules and returns a structured verdict with confidence and reasoning. Anything still unclear goes to a review queue in Retool, and reviewed listings flow back into the training data. An inspector agent runs outside the hot path and explains why predictions were not confident: a noisy model name, a wrong year, under-represented training data, or a conflict. It proposes the fix, such as synthetic data or a review batch. I orchestrated it in plain Python with Pydantic outputs instead of a framework, because the pipeline is mostly deterministic and every agent step needs to be easy to test, trace, and replace.

Agents as the last mile: matching classic-car listings without letting the LLM drive

Every classic-car listing has to end up on exactly one taxonomy id: make, model, family, generation, variant. The input looks like this: porsche, 991 SPEEDSTER 4.0 CARBO-LIFTING-NAVI, 2019. The answer should be 911 991 Speedster. Multiply that by dozens of sources, thousands of models, and sellers who write whatever they like.

An LLM could probably guess most of these. But guessing is the problem. A wrong match quietly corrupts price statistics, and nobody notices until a client does. So the design rule was: deterministic where possible, agents only where the information is in free text, and a human for whatever is left.

The pipeline, cheapest step first

  1. Similarity matcher. The neural network only knows model names from training. A new string has to be mapped to a known one first. Fuzzy and Jaccard scores plus hand-written rules pick the closest training name and mark whether the match is confident.
  2. Hierarchical neural network. Trained per make. It predicts model, then family, generation, and variant. Each level only allows values that are valid under the level above, because a Porsche cannot have a BMW model. Combining the probabilities gives a score for every valid taxonomy id.
  3. Agent steps. If one candidate clearly wins, done. If not, the remaining candidates go to the agents.

Most listings never reach an LLM. That keeps cost down and makes the bulk of the decisions explainable with numbers.

Why I did not use an agent framework here

The orchestration is mostly a fixed sequence with a few branches. LangGraph or a similar framework would have added a dependency and a second mental model without solving anything. Instead each agent step is a Python class with a typed input, a typed Pydantic output, a small set of tool functions, and a loop limit. The orchestrator is a function that calls stages in order and branches on confidence.

This also made testing simple. Every stage runs standalone from the command line, and the deploy script runs the inference tests first and stops on failure.

The agent steps

Description agent. It gets the listing description and the remaining taxonomy candidates. Its tools: look up a candidate's details, check whether the listing year fits a candidate's production range, and compare two candidates on their distinguishing features. It returns a winner, a confidence, its reasoning, and the evidence from the text. Some taxonomies are marked "year not meaningful", and the tool respects that instead of rejecting good matches.

Verifier agent. A second, cheaper model checks the decision against hard rules: the year range, the make/model hierarchy, and whether the cited evidence actually appears in the description. If it disagrees, the listing is not forced through. It goes to review.

Escalation. Not-confident listings land in a review table with the reason attached. In Retool a reviewer accepts, corrects, or parks them. Accepted reviews become training data, so the next training run learns from them.

The inspector: an agent that explains failure

The hardest questions came after launch: why is this make suddenly not confident? Why does Chevrolet get no LLM matches at all?

The inspector agent runs outside the inference path. It reads the not-confident predictions and the training data, groups them by model and year, and classifies the cause: too much noise in the model name, a wrong year, an under-represented model, two taxonomies conflicting for the same model and year, or a failure in the description step. For each cluster it proposes the action: generate synthetic data for under-represented models, send a batch to review, or flag a conflict for someone to resolve.

That is how the Chevrolet case was found. The problem was not the LLM at all. It was the component that created synthetic training data. Without the inspector it would have looked like a model problem.

Keeping quality

Takeaway

Agents were the last mile, not the engine. The numbers do the bulk of the work. Agents read the text the numbers cannot. A human handles the rest. Keeping the orchestration in plain code made each of those boundaries visible.

More cases