This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Generate and apply insights automatically based on constraints #163
Labels
does not require ML knowledge
✨ enhancement
New feature or request
🎯 P1
⭐ top feature
Top feature request.
⭐ top issue
Top issue.
Being able to generate and add automatically information based on available product data would be very valuable.
This new information can be computed using a list of known rules, such as:
Each rule has a list of input conditions and an output (addition of one or more information to the product). As a first step, we can create these first input conditions:
hasCategory
, target categoryvalue_tag
as parameterhasIngredient
, target ingredientvalue_tag
as parameterhasNotIngredient
, target ingredientvalue_tag
as parameterhasBrand
, normalized brand name as parameterhasLabel
, target labelvalue_tag
as parameterpackagerCodeStartsWith
, with string (pattern) as parameterAs output:
addCategory
addStore
addLabel
We can implement this rule engine in Robotoff. Each time a product is updated, Robotoff receives a webhook call. We can check all rules against the product, and generate insights that are automatically applied. We can store the rules in Postgres DB, to allow easy editing/collaboration.
For the rule engine, @alexgarel has suggested to use Lucene query language (see https://github.com/jurismarches/luqum), as we're going to index all data in an Elasticsearch instance. We would search for products that match each rule instead of searching for rules that match the product. Given how simple the rules are (binary AND operator only), I don't believe we need a tool as powerful as Elasticsearch for this.
Not supported yet by Robotoff but to be done:
The text was updated successfully, but these errors were encountered: