fix
This commit is contained in:
@@ -78,6 +78,31 @@ go run ./cmd/formula-e2e -new-tenant -llm-base http://127.0.0.1:18767/v1
|
||||
`-llm-base` pins the provider for the run; without it the harness uses whatever
|
||||
`platformsettings.ResolveOpenAI` returns (admin DB setting first, then env).
|
||||
|
||||
## Low-confidence categorisation fails the product
|
||||
|
||||
The categorize model always answers with *some* id from the list, so a reply like
|
||||
`{"categoryId":"1","confidence":0.08}` is the model saying "I do not know". Taking
|
||||
it at face value files a camping chair under Generators and then drives that
|
||||
category's formula, producing confidently wrong copy.
|
||||
|
||||
Below `processing.DefaultMinCategorizeConfidence` (**0.75**) the product fails with
|
||||
`ErrCategoryNotFound` and processing stops there — enhance is never called, so no
|
||||
credits and no provider cost are spent writing copy for a category nobody believes
|
||||
in. The same applies when the model returns an id outside the taxonomy.
|
||||
|
||||
```
|
||||
processing: category rejected uid=1 confidence=0.08 min=0.75 reason=low_confidence
|
||||
processing: item failed ... err=product category could not be determined:
|
||||
best match "1" scored 0.08, below the 0.75 minimum
|
||||
```
|
||||
|
||||
The product lands in the job as `failed` with that message on
|
||||
`processing_job_products.error`, and `raw_products.processing_status = 'failed'`.
|
||||
|
||||
Not gated: a category that came from the feed, vector or a prior run (categorize
|
||||
never runs), a model that reports no confidence at all, and AI-disabled plans.
|
||||
Override the floor per job with `StepPolicy.MinCategorizeConfidence`.
|
||||
|
||||
## Why enhance can still return feed copy
|
||||
|
||||
In order of how often it bites:
|
||||
|
||||
Reference in New Issue
Block a user