A JA Mercari·Practitioner post·

Mercari's catalog integration rebuilt with LLM conversion and a prompt-generating agent (プロンプト生成エージェントとLLMによるメルカリの商品カタログ連携のAI-Native化)

A · Strong evidence Mercari's Product Data Team documents a production change with a held-out 1,000-pair evaluation, a strict all-field metric and model-by-prompt comparisons; the throughput and effort gains are self-reported quarter-on-quarter figures.

Summary based on the full text·Original: about 15 minutes to read

One of the Library's top reads

In short

A Mercari Engineering blog post (10 November 2026) on rebuilding how external product data from retailers and data providers is converted into Mercari's product catalog. Conversion rules written in Go by engineers from specs were replaced by natural-language prompts run through an LLM with structured outputs. A second component, a Claude Code skill called the Prompt Generation Agent, investigates the source data, drafts the prompt and schema and tunes them against samples. Catalog specialists now edit rules themselves; in the first quarter the team integrated six categories against a previous limit of one a quarter.

Key numbers

  • 85.2% vs 69.6%all-15-fields-correct rate, agent-tuned prompt on production gpt-5.4-mini vs the old Go rule-based conversion
  • 66.2%same model with few-shot examples only, below the rule-based baseline
  • 98.7%all-field accuracy with the tuned prompt on gpt-5.6 (92.3% few-shot only)
  • 40x+catalog records integrated in the first quarter vs the previous quarter, with about the same team
  • about 55%cut in effort to integrate one new category

As reported by the source.

Read the original on engineering.mercari.com

Japanese·Web page·opens engineering.mercari.com

What it reports

  • Before: catalog specialists wrote specs, engineers implemented dictionaries and patterns in Go batches; each new notation or exception added rules and regression checks, which limited integrations to one category per quarter.
  • LLM Data Conversion: one external record plus the prompt goes to the LLM; output is JSON constrained by a schema; only the conversion step of the existing batch was replaced. Prompts live as Markdown files in the repository.
  • Quality controls: structured outputs to restrict values; simple or integrity-critical logic kept in code (for example, duplicate-product checks); a correction loop where fixed records are flagged out of batch updates until the prompt fix ships, with dry-runs to CSV.
  • The agent queries the source tables in BigQuery for missing rates, value distributions and exceptions; checks that took people days take tens of minutes.
  • Offline evaluation on Pokemon cards: 1,000 held-out pairs, exact match on 15 fields. Rule-based 69.6%; gpt-5.4-mini few-shot 66.2%, tuned 85.2%; gpt-5.6 few-shot 92.3%, tuned 98.7%. The agent ran on Claude Opus 5.5.
  • The few-shot failure on the small model was filling in values not present in the input; adding a "do not fill missing values" rule fixed most of it.
  • Outcome after one quarter: six categories, more than 40 times the records, about 55% less effort per category; data investigation and conversion build time fell to under a third. LLM cost per record is described as very small.
  • Remaining manual work: people still find errors by periodic checks, and prompt fixes need a release; automating that loop is the next step.

How they got it

A first-hand account by two product engineers. Accuracy comes from an offline evaluation where the agent tuned prompts only on development data and was scored on a separate 1,000-record set. Throughput and effort figures compare the quarter of introduction with the prior quarter.

Limits

  • The evaluation covers one category (Pokemon cards); results for other categories are not shown.
  • The 40x and 55% figures are self-reported, before-and-after, with no detail on how effort was measured.
  • LLM running cost is described qualitatively, with no per-record figure.
  • Includes a recruiting section.

Why it matters for companies

Any company that maps supplier or partner data into its own master data faces the same rule sprawl. The useful lessons are specific: keep deterministic checks such as duplicate detection in code, constrain the output schema, hold out an evaluation set the tuning agent cannot see, and give domain specialists direct ownership of the rules. The gain came from removing the spec-to-engineer hand-off, which matters more than the model choice. The cheaper model only beat the old rules after deliberate prompt tuning, so a few-shot pilot can understate or misstate what is achievable.

Key passages in translation

Japanese original

変換ルールを、コードではなく自然言語のプロンプトとして書く。

English translation

Write the conversion rules as natural-language prompts instead of code.

Japanese original

本番の gpt-5.4-mini は、Few-shot だけだと、入力にない値を自分の知識で補ってしまう誤りが多く、66.2% とルールベース(69.6%)を下回りました。

English translation

With few-shot examples only, the production gpt-5.4-mini often filled in values absent from the input, scoring 66.2%, below the rule-based 69.6%.

Japanese original

一方で、誤りを見つけて直すループには、まだ人の手が多く残っています。

English translation

On the other hand, much of the loop for finding and fixing errors is still manual.

Summary based on the full text. Read the original for the full argument and data.Read the original on engineering.mercari.com

Tags

Same week

All of Week 46