Skip to content
vp.Ven Petrov
WorkAI demoWritingResourcesResume / CVAboutAt a glance
← Projects & notes
Product-description comparison benchExperiment · 4 min read

Where did the product description get that detail wrong?

A product description can go wrong when the image is read or when the copy is written. This local bench exposes both steps, lets me switch models and records request measurements. A matched quality comparison is still unfinished.

Ven PetrovLocal comparison prototype

If a product is red and its generated description says blue, I want to know where that detail changed. Did the model misread the image, or did the writing step introduce the error? This is an illustrative example, not a recorded failure from the project.

That question is the reason to inspect more than the finished paragraph. I built a small product-description bench with a React interface and Node backend. It can send images and writing requirements in one model request, or split the work into visual analysis followed by copywriting. Each step can use a different provider and model.

The implemented result is a way to compare those paths and see what each request received and returned. I have not yet completed a matched-image output review that establishes which path produces better descriptions.

Follow one product detail through the requests

In the two-step route, I can read the visual description before judging the final copy. In the red-product example, an intermediate description saying blue would place the error in the image-reading step. If that description says red but the final copy says blue, the writing step changed it.

The implementation exposes that sequence:

Product images
  -> analyzeImages(): visual description
  -> formatDescription(): requested language, style and format
  -> final copy

analyzeImages() sends the images to a model that accepts visual input. formatDescription() receives the returned text and does not inspect the images again. A wrong detail in that text can carry into the final description. Splitting the requests makes it visible; it does not automatically correct it.

This also gives the extra call a question to answer. Does the separation produce better copy on the same images, with enough benefit to justify its time and cost? The prototype has the request paths and measurements, but not that completed evaluation.

Put the writing requirements where the writing happens

The vision prompt leaves out free-form custom instructions and the requested output language. It can still include a controlled tone preset. The writing prompt adds language, tone, custom instructions and the HTML or plain-text requirements.

The first step describes the visible product. The second presents that description in the requested form. In the single-call route, the images and those requirements go into one request.

Both routes remain available, with OpenAI and OpenRouter provider support. Leaving instructions out of one phase is not a guarantee against malicious instructions in the input, and having two phases does not establish that the answer is more accurate.

Keep the prompt and model choice beside the output

The newer two-phase API returns system prompts, user prompts and responses for both steps, including the intermediate visual description. Its metadata includes provider and model choices, prompt-template versions, image count, response time and token usage for each phase.

The newer single-call route returns its combined prompts and totals. The legacy API returns the description and metadata without those prompt records. Those differences matter when comparing saved responses: a changed template or model is part of what changed in the experiment.

Retained prompts make a result easier to inspect. They do not guarantee that sending it again will produce identical text.

A returned cost and an estimate need different labels

For OpenRouter, the code first checks for a cost returned with usage:

if (result.provider === 'openrouter' && result.usage?.cost !== undefined) {
  return result.usage.cost;
}

If there is no returned amount, it estimates cost from input and output tokens using the configured price table. Those values have different origins. The saved configuration uses historical prices, so it cannot serve as a current price quote.

The grouped provider statistics have another limit. For a two-phase request using different providers, the logger attributes the full request cost to each involved provider group. Those groups therefore cannot be read as a phase-by-phase bill.

The local debug log retains input images, instructions and final descriptions in a JSON file. It uses read-modify-write, which needs better handling before concurrent use. It is a local inspection aid, rather than a durable trace store.

To finish the comparison, I need outputs generated from the same images and judged against the same product facts. Until then, the supported result is an implemented comparison bench. I have not verified a quality improvement, SEO result, cost saving or production deployment.

Project sources & checks
Implementation

The private image-description MVP contains a React/Vite frontend and Node/Express backend. llmProvider.js, promptBuilder.js and logger.js support the comparison paths.

Response scope

The newer API returns prompts; its two-phase mode returns intermediate analysis and per-phase time, token and cost fields. Its single-call branch returns combined prompts and totals. The legacy API returns description and metadata without prompts.

Example boundary

The product-color example explains how to read the two stages. It is illustrative, not a saved model response or a reported failure.

Unfinished evaluation

No matched-image quality result, SEO improvement, cost saving or production deployment has been verified. Configured prices are historical; grouped provider statistics attribute a full request cost to each involved provider.

Local logging limits

Debug logs retain inputs and final output in a JSON file using read-modify-write. This is not a durable concurrent trace store, and retained prompts do not guarantee identical model output.

On this page
Follow one product detail through the requestsPut the writing requirements where the writing happensKeep the prompt and model choice beside the outputA returned cost and an estimate need different labelsSources & checks
ReactNode.jsOpenAIOpenRouterEvaluation

Connected to this

All writing
Between Us · Project story

Between Us: keeping control of a generated film

ctxforge · Project story

ctxforge: turn “add search” into a task an agent can build

Ven PetrovSoftware engineer · Barcelona
GitHub ↗LinkedIn ↗Email ↗

Find a project or a note

18 results

Transfutur ERP · ExperienceERP for transport and logisticsAs the sole engineer, I built an ERP from zero for transport and logistics. It supported roughly €5–6 million in annual invoicing across two offices, and I kept it running for about a year.Finance evidence desk · Project storyCan an AI reviewer improve a financial explanation?A finance review needs the right explanation as well as the right numbers. I tested one AI analyst, an added reviewer and self-review on the same public report. The added review produced fewer supported answers.Financial review lab · Project storyWhat contributed to an $86 million rise in operating income?I built a financial-report explorer around a question I could check: how did seven income-statement movements add up to an $86 million increase? The same source now supports comparisons of sales, cash flow and reported versus core results.MNQ time-series research · ExperimentA time-series model that failed on later dataA model gained about $2,351 in the research simulation, then lost about $1,728 in three later windows. I followed the experiment from data acquisition and time intervals to costs, evaluation and the decision to reject it for trading.Crude-oil narrative tracker · Project storyFollowing crude-oil news without losing the market numbersI used a short personal experiment to follow global events alongside crude-oil prices and position values. The prototype calculates the numbers before asking Claude Code for an assessment and keeps a limited recent history.NQ/MNQ backtest engine · Technical noteYesterday’s short was blocking today’s trades in the simulatorWhen input stopped before the scheduled close, the strategy forgot a position but a shared counter kept counting it. Closing the old position before resetting the day restored the trade record and released the block.Small-cap edge research · Project storyWhat would make a small-cap price pattern worth testing?I built a Python and DuckDB prototype to turn trading ideas into named tests, compare their costs and revisit them in later periods. The candidates deteriorated under further checks, and the source exposed a misleading pass flag.Gadgeon Europe applications · ExperienceConnected-device dashboards and mobile apps at Gadgeon EuropeThe dashboards let people monitor energy use and control connected devices through data from several APIs. My work covered customized Ionic and Angular apps, integrations, store releases and maintenance.ctxforge · Project storyctxforge: turn “add search” into a task an agent can build“Add search” leaves decisions about data, matching and behavior unanswered. I built an editable toolkit that asks an LLM to uncover those requirements and show its assumptions before a coding agent starts.Sociedades Inactivas enquiries · Technical noteAn enquiry should survive a failed emailA failed notification should not make someone submit the same enquiry twice. The implemented form keeps the saved request and its reference while email delivery is retried; live activation is still pending.Astro local-services website · Project storyKeeping local service pages and their FAQs consistentA city page should only offer services enabled for that location. I used shared Astro templates with explicit availability rules, and one FAQ selection for both the visible page and its structured data.3D Spaces website migration · Project storyMoving 3D Spaces without moving its mailboxThe website could move to Next.js and Vercel, while email still depended on the old host. I carried over the pages, enquiry flow and analytics, then checked what the cutover had actually preserved.Capture CRM · Project storySave the listing now, connect the person when the details arriveA classified listing may arrive before its phone number or contact name. Capture CRM keeps those records separate, then lets a later capture complete the existing listing and bring contact status back to the browsing page.Product-description comparison bench · ExperimentWhere did the product description get that detail wrong?A product description can go wrong when the image is read or when the copy is written. This local bench exposes both steps, lets me switch models and records request measurements. A matched quality comparison is still unfinished.Between Us · Project storyBetween Us: keeping control of a generated filmA more emotional dialogue take still needed convincing acting and framing. I kept the alternatives, widened shots to reveal gestures and changed the workflow when its studio limited the films I wanted to make.Restaurant-service voice agent · ExperimentDesigning a restaurant-service call around the real offerThe first correction was the offer: a paid service had become a free visit in one draft. I then compared how the Spanish voice-agent prompts handled new speakers, technical limits and booking results.Vapi and Telnyx voice integration · Technical noteThe Vapi agent could speak, but it could not hear me clearlyI could hear the assistant, but it could not understand my distorted audio. Three codec tests changed the connection behavior and brought the greeting back; the caller-audio problem remains unresolved.Warloop: Echoes of Solmara · Project storyWarloop: turning generated character art into a playable prototypeGood-looking character images became tiny figures, a backwards walk and misplaced bosses in the game. I worked through the gap between generated art and playable behavior.
esc to close · Tab to move through results