All projects

ENGINEERING CASE / AI + BACKEND

B2B Product Content Generator

Draft listings for industrial measuring instruments: FastAPI, Pydantic, GigaChat

Technical product descriptions cannot replace factual specifications with plausible generated claims. The service must prepare SEO copy while preserving the supplied specifications.

Screening exercise for an AI/LLM engineering role

01 / CONTEXT

Problem and contribution

Engineering problem

Technical product descriptions cannot replace factual specifications with plausible generated claims. The service must prepare SEO copy while preserving the supplied specifications.

What I implemented

Implemented the HTTP API, input/output schemas, GigaChat adapter, strict JSON parsing, result checks and tests. Structured technical values remain under application control, not LLM control.

02 / FLOW

End-to-end flow

Each step separates input, action and result. This is not a simulated live API.

  1. 01

    Structured input

    POST /generate accepts the product name, manufacturer, specs and an optional description. Pydantic validates shape and size.

    Invalid requests are rejected before any LLM call.

  2. 02

    Specifications preserved

    The service copies the input specs directly and excludes technical specifications from the model's generated fields.

    The LLM does not rewrite the specifications dictionary.

  3. 03

    Text generation

    GigaChat proposes only SEO title, description, search queries and a commercial note.

    Strictly validated JSON yields the proposed text fields.

  4. 04

    Validation

    Pydantic, length and formatting rules, plus heuristics for selected risky and numeric claims.

    ready_for_review, requires_revision or insufficient_data and diagnostic warnings.

  5. 05

    Human handoff

    The API consumer receives the JSON draft and independently reviews its claims.

    ready_for_review is not publication approval.

Diagnostic status

  • ready_for_review — formal checks passed; human editorial approval still needed
  • requires_revision — content or formatting violations detected
  • insufficient_data — product details do not support reliable text

03 / SOURCE-BACKED EXCERPT

Sample input and output

Short excerpts from public submission files (4 of 13 specifications). The saved result uses offline replay of recorded responses and grounded fallback, not live generation on this site. Manual semantic review remains mandatory.

Input JSON excerpt

{
  "name": "Термометр РОСМА БТ-51.211 (0–100 °C) G1/2.100.1,5",
  "manufacturer": "РОСМА",
  "specs": {
    "диаметр корпуса": "100 мм",
    "диапазон показаний": "0…+100 °C",
    "резьба гильзы": "G1/2",
    "класс точности": "1,5"
  }
}

Output excerpt

{
  "status": "ready_for_review",
  "card": {
    "seo_title": "Термометр РОСМА БТ-51.211 (0–100 °C) G1/2.100.1,5 — характеристики",
    "specifications": {
      "диаметр корпуса": "100 мм",
      "диапазон показаний": "0…+100 °C",
      "резьба гильзы": "G1/2",
      "класс точности": "1,5"
    }
  },
  "missing_fields": [],
  "warnings": []
}

Provenance: offline_replay · gigachat_recorded_response_with_grounded_fallback

04 / ENGINEERING

Design rationale

The core design separates immutable structured specifications from free-form model output. Text checks are intentionally heuristic and do not replace manufacturer-document verification.

Result and verification

A locally runnable /generate and /health HTTP API returns a draft with diagnostic status. There is no public catalog integration or automatic publishing.

Diagnostic status

The v0.1.2 acceptance report records 384 tests, 96.73% branch coverage and 20/20 live drafts marked ready_for_review. These are reported results, not independently rerun website measurements.

05 / BOUNDARIES

Known limitations

  • A 10-request concurrent test with a personal GigaChat account produced nine HTTP 429 responses. A single process-local LLM semaphore was added afterwards; no post-fix live rerun was recorded.
  • The semaphore is not a distributed limiter across worker processes.
  • Free-form text checks are heuristic; semantic errors and incorrectly matched product properties remain possible.
  • External client authentication, background queues, an editorial UI and automated publishing are not implemented.

Publication restrictionEvery draft, including ready_for_review, requires manual fact review before publication.

06 / EVIDENCE

Source evidence

Source files are pinned to an immutable SHA. Reported test metrics were not rerun for this portfolio.

← All projects