You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by "Thomas Draier (JIRA)" <ji...@apache.org> on 2017/11/02 09:49:00 UTC
[jira] [Updated] (UNOMI-134) Added personalized sort feature in
ContextServlet
[ https://issues.apache.org/jira/browse/UNOMI-134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Draier updated UNOMI-134:
--------------------------------
Description:
Hi,
In order to use unomi to personalization, we currently rely on the "filter" feature of the ContextServlet. This field allows to ask unomi if a condition is matched or not by the current user/session. This is however quite limited to do complex personalization - we don't only want to know if a content matches/does not match a user, but rather know which content matches "best". Instead of simple a yes/no filter.
I suggest we add a new field in the ContextRequest, that would allow to ask unomi for a sort. Unomi could have different (pluggable) strategies to do the sort.
As an example, the "score" strategy could sort the items based "scoring plan" like condition - each item is associated a list of condition-score pairs - score with matching conditions are summed up and items sorted based on the final score value.
Context request could look like :
{{ {
...
"source" : .. ,
"events" : [ ... ],
"sorts" : [
{
"id":"mysort",
"strategy": "score",
"strategyOptions": {
"threshold" : 10
},
"contents" : [
{
"filterid": "item1",
"filters": [
{
"condition": {
"parameterValues": {
"segments": [
"_nfpvub955"
],
"matchType": "all"
},
"type": "profileSegmentCondition"
},
"properties": {
"score":25
}
}
]
},
{
"filterid": "item2",
"filters": [
{
"condition": {
"type": "deviceCategoryCondition",
"parameterValues": {
"deviceCategories": [
"PDA",
"Personal computer"
],
"matchType": "in"
}
},
"properties": {
"score":100
}
}
]
}
]
}
]
...
} }}
Based on the results, unomi will return the sorted list :
{{ {
...
"sortResults":{"mysort":["item1","item2"]}
...
} }}
Strategies would be implemented as dedicated classes, taking the Sort object as parameter, returning sorted list of ids.
Other simpler strategies that could be used for personalization could be a simple "filter" (as the current filter field, will just filter the list based on the fact a condition is matched or not, but keep the order), or "random" (same as filter, but randomly sort the results at the end)
was:
Hi,
In order to use unomi to personalization, we currently rely on the "filter" feature of the ContextServlet. This field allows to ask unomi if a condition is matched or not by the current user/session. This is however quite limited to do complex personalization - we don't only want to know if a content matches/does not match a user, but rather know which content matches "best". Instead of simple a yes/no filter.
I suggest we add a new field in the ContextRequest, that would allow to ask unomi for a sort. Unomi could have different (pluggable) strategies to do the sort.
As an example, the "score" strategy could sort the items based "scoring plan" like condition - each item is associated a list of condition-score pairs - score with matching conditions are summed up and items sorted based on the final score value.
Context request could look like :
{{
{
...
"source" : .. ,
"events" : [ ... ],
"sorts" : [
{
"id":"mysort",
"strategy": "score",
"strategyOptions": {
"threshold" : 10
},
"contents" : [
{
"filterid": "item1",
"filters": [
{
"condition": {
"parameterValues": {
"segments": [
"_nfpvub955"
],
"matchType": "all"
},
"type": "profileSegmentCondition"
},
"properties": {
"score":25
}
}
]
},
{
"filterid": "item2",
"filters": [
{
"condition": {
"type": "deviceCategoryCondition",
"parameterValues": {
"deviceCategories": [
"PDA",
"Personal computer"
],
"matchType": "in"
}
},
"properties": {
"score":100
}
}
]
}
]
}
]
...
}
}}
Based on the results, unomi will return the sorted list :
{{
{
...
"sortResults":{"mysort":["item1","item2"]}
...
}
}}
Strategies would be implemented as dedicated classes, taking the Sort object as parameter, returning sorted list of ids.
Other simpler strategies that could be used for personalization could be a simple "filter" (as the current filter field, will just filter the list based on the fact a condition is matched or not, but keep the order), or "random" (same as filter, but randomly sort the results at the end)
> Added personalized sort feature in ContextServlet
> -------------------------------------------------
>
> Key: UNOMI-134
> URL: https://issues.apache.org/jira/browse/UNOMI-134
> Project: Apache Unomi
> Issue Type: New Feature
> Components: web
> Reporter: Thomas Draier
> Assignee: Thomas Draier
> Priority: Normal
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> Hi,
> In order to use unomi to personalization, we currently rely on the "filter" feature of the ContextServlet. This field allows to ask unomi if a condition is matched or not by the current user/session. This is however quite limited to do complex personalization - we don't only want to know if a content matches/does not match a user, but rather know which content matches "best". Instead of simple a yes/no filter.
> I suggest we add a new field in the ContextRequest, that would allow to ask unomi for a sort. Unomi could have different (pluggable) strategies to do the sort.
> As an example, the "score" strategy could sort the items based "scoring plan" like condition - each item is associated a list of condition-score pairs - score with matching conditions are summed up and items sorted based on the final score value.
> Context request could look like :
> {{ {
> ...
> "source" : .. ,
> "events" : [ ... ],
> "sorts" : [
> {
> "id":"mysort",
> "strategy": "score",
> "strategyOptions": {
> "threshold" : 10
> },
> "contents" : [
> {
> "filterid": "item1",
> "filters": [
> {
> "condition": {
> "parameterValues": {
> "segments": [
> "_nfpvub955"
> ],
> "matchType": "all"
> },
> "type": "profileSegmentCondition"
> },
> "properties": {
> "score":25
> }
> }
> ]
> },
> {
> "filterid": "item2",
> "filters": [
> {
> "condition": {
> "type": "deviceCategoryCondition",
> "parameterValues": {
> "deviceCategories": [
> "PDA",
> "Personal computer"
> ],
> "matchType": "in"
> }
> },
> "properties": {
> "score":100
> }
> }
> ]
> }
> ]
> }
> ]
> ...
> } }}
> Based on the results, unomi will return the sorted list :
> {{ {
> ...
> "sortResults":{"mysort":["item1","item2"]}
> ...
> } }}
> Strategies would be implemented as dedicated classes, taking the Sort object as parameter, returning sorted list of ids.
> Other simpler strategies that could be used for personalization could be a simple "filter" (as the current filter field, will just filter the list based on the fact a condition is matched or not, but keep the order), or "random" (same as filter, but randomly sort the results at the end)
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)