Catalog feature updates on column fields
This commit is contained in:
@@ -507,6 +507,52 @@ But that stability is per `image_id`: change the product name and you get a new
|
||||
10. Deterministic Product Validation Gate
|
||||
11. Vector Embedding & Storage
|
||||
|
||||
Stages 8 and 9 each run several enrichment steps internally; the stage count and
|
||||
numbering are unchanged.
|
||||
|
||||
### What gets filled for a branded row, and how far to trust it
|
||||
|
||||
The rules above for `Own Products` still hold — an unbranded row is stored as
|
||||
you sent it. A **branded** row is gap-filled, and every filled value records
|
||||
*how* it was arrived at in a `field_sources` map on the row, so nothing has to
|
||||
be taken on trust:
|
||||
|
||||
| `method` | Means | Example |
|
||||
| --- | --- | --- |
|
||||
| `sourced` | a real value from a real external source | nutrients measured per 100 g, from Open Food Facts |
|
||||
| `derived` | computed from another field on the same row | `ean13` from `barcode`; `tax_amount` from your price |
|
||||
| `estimated` | a category-level or brand-level inference | the keyword nutrient list before a lookup succeeds |
|
||||
| `not_applicable` | cannot exist for this product, and should not | nutrition on a shampoo; an FSSAI *food* licence on a detergent |
|
||||
| `unknown` | we have not got it and have no source for it | an FSSAI licence for a brand not in the registry |
|
||||
|
||||
Two consequences worth reading twice:
|
||||
|
||||
- **`not_applicable` is not a gap.** Roughly 30% of a general FMCG catalog is
|
||||
soap, shampoo and detergent. Those rows will never have nutrients or a health
|
||||
score. Coverage percentages are reported against the *applicable* rows, so
|
||||
they describe work remaining rather than work impossible.
|
||||
- **`barcode_verified: false` means the pack is not confirmed.** A barcode found
|
||||
by name match against a brand's catalogue is a real GS1 code for that brand,
|
||||
written to every size variant of the title. Good enough for catalog matching,
|
||||
dedup and nutrition lookups; **not** good enough for logistics, invoicing, or
|
||||
anything a scanner drives. Filter on it before relying on a barcode
|
||||
commercially.
|
||||
|
||||
Nothing is ever invented. There is no LLM anywhere in the nutrient, barcode,
|
||||
FSSAI or tax path, and a value that cannot be sourced or safely derived is left
|
||||
empty and labelled rather than guessed.
|
||||
|
||||
### Barcodes arrive after the upload finishes
|
||||
|
||||
Barcode and nutrition enrichment need the network, so they do **not** hold up
|
||||
your response. Ingestion returns as soon as the rows are stored; a background
|
||||
job then fetches each brand's catalogue and fills barcodes, nutrition and health
|
||||
scores over the following minutes. Its id is on the batch as `nutrition_job_id`
|
||||
and its progress is at `GET /api/admin/nutrition-intelligence/jobs/{job_id}`.
|
||||
|
||||
So a row read immediately after a `200` may have no barcode yet and have one a
|
||||
few minutes later. That is expected, and re-reading is the only action needed.
|
||||
|
||||
### Limits
|
||||
|
||||
| Limit | Value | Env var | Exceeded |
|
||||
|
||||
Reference in New Issue
Block a user