Generate and apply insights automatically based on constraints #1225
raphael0202
started this conversation in
Ideas
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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:
Beta Was this translation helpful? Give feedback.
All reactions