Metarank: 서비스로서의 실시간 개인화
Metarank는 오픈소스 순위 서비스입니다. 개인화된 의미/신경망 검색 및 추천을 구축하는 데 도움이 될 수 있습니다.
방금 시작하고 싶다면 다음을 시도해 보세요.
Metarank를 사용하면 기존 검색 및 추천을 더욱 스마트 하게 만들 수 있습니다.
Metarank는 빠릅니다 .
개발 시간을 절약하세요.
Metarank는 검색 및 추천을 위한 고급 순위 시스템을 구축하는 데 도움이 됩니다.
블로그 게시물:
모임 및 컨퍼런스 토크:
Demo.metarank.ai에서 Metarank 데모를 플레이할 수 있습니다.
데모 자체와 사용된 데이터는 오픈 소스이며 github 저장소에서 교육 이벤트 및 구성 파일의 복사본을 얻을 수 있습니다.
단 1분 만에 LambdaMART 기반 재순위 지정을 통해 콘텐츠 개인화를 시작할 수 있는 방법을 보여드리겠습니다.
데모에서 사용되는 Ranklens 데이터세트를 사용할 것이므로 데이터 파일을 다운로드하기만 하면 됩니다.
curl -O -L https://github.com/metarank/metarank/raw/master/src/test/resources/ranklens/events/events.jsonl.gz
데모의 구성 파일을 다시 사용하겠습니다. 인메모리 저장소를 활용하므로 다른 종속성은 필요하지 않습니다.
curl -O -L https://raw.githubusercontent.com/metarank/metarank/master/src/test/resources/ranklens/config.yml
마지막 단계에서는 훈련과 API 실행을 하나의 명령으로 결합하는 Metarank의 standalone
모드를 사용합니다.
docker run -i -t -p 8080:8080 -v $( pwd ) :/opt/metarank metarank/metarank:latest standalone --config /opt/metarank/config.yml --data /opt/metarank/events.jsonl.gz
Metarank가 데이터를 시작하고 다듬는 동안 몇 가지 유용한 출력을 볼 수 있습니다. 이 작업이 완료되면 localhost:8080
에 요청을 보내 개인화된 결과를 얻을 수 있습니다.
여기서 우리는 그 중 하나를 클릭하고 결과를 관찰함으로써 여러 영화와 상호 작용할 것입니다.
먼저 Metarank와 상호작용하기 전에 제공되는 초기 출력을 살펴보겠습니다.
# get initial ranking for some items
curl http://localhost:8080/rank/xgboost
-d ' {
"event": "ranking",
"id": "id1",
"items": [
{"id":"72998"}, {"id":"67197"}, {"id":"77561"},
{"id":"68358"}, {"id":"79132"}, {"id":"103228"},
{"id":"72378"}, {"id":"85131"}, {"id":"94864"},
{"id":"68791"}, {"id":"93363"}, {"id":"112623"}
],
"user": "alice",
"session": "alice1",
"timestamp": 1661431886711
} '
# {"item":"72998","score":0.9602446652021992},{"item":"79132","score":0.7819134441404151},{"item":"68358","score":0.33377910321385645},{"item":"112623","score":0.32591281190727805},{"item":"103228","score":0.31640256043322723},{"item":"77561","score":0.3040782705414116},{"item":"94864","score":0.17659007036183608},{"item":"72378","score":0.06164568676567339},{"item":"93363","score":0.058120639770243385},{"item":"68791","score":0.026919880032451306},{"item":"85131","score":-0.35794106000271037},{"item":"67197","score":-0.48735167237049154}
# tell Metarank which items were presented to the user and in which order from the previous request
# optionally, we can include the score calculated by Metarank or your internal retrieval system
curl http://localhost:8080/feedback
-d ' {
"event": "ranking",
"fields": [],
"id": "test-ranking",
"items": [
{"id":"72998","score":0.9602446652021992},{"id":"79132","score":0.7819134441404151},{"id":"68358","score":0.33377910321385645},
{"id":"112623","score":0.32591281190727805},{"id":"103228","score":0.31640256043322723},{"id":"77561","score":0.3040782705414116},
{"id":"94864","score":0.17659007036183608},{"id":"72378","score":0.06164568676567339},{"id":"93363","score":0.058120639770243385},
{"id":"68791","score":0.026919880032451306},{"id":"85131","score":-0.35794106000271037},{"id":"67197","score":-0.48735167237049154}
],
"user": "test2",
"session": "test2",
"timestamp": 1661431888711
} '
이제
93363
항목과 상호작용해 봅시다.
# click on the item with id 93363
curl http://localhost:8080/feedback
-d ' {
"event": "interaction",
"type": "click",
"fields": [],
"id": "test-interaction",
"ranking": "test-ranking",
"item": "93363",
"user": "test",
"session": "test",
"timestamp": 1661431890711
} '
이제 Metarank는 항목을 개인화하므로 응답 항목의 순서가 달라집니다.
# personalize the same list of items
# they will be returned in a different order by Metarank
curl http://localhost:8080/rank/xgboost
-d ' {
"event": "ranking",
"fields": [],
"id": "test-personalized",
"items": [
{"id":"72998"}, {"id":"67197"}, {"id":"77561"},
{"id":"68358"}, {"id":"79132"}, {"id":"103228"},
{"id":"72378"}, {"id":"85131"}, {"id":"94864"},
{"id":"68791"}, {"id":"93363"}, {"id":"112623"}
],
"user": "test",
"session": "test",
"timestamp": 1661431892711
} '
# {"items":[{"item":"93363","score":2.2013986484185124},{"item":"72998","score":1.1542776301073876},{"item":"68358","score":0.9828904282341605},{"item":"112623","score":0.9521647429731446},{"item":"79132","score":0.9258841742518286},{"item":"77561","score":0.8990921381835769},{"item":"103228","score":0.8990921381835769},{"item":"94864","score":0.7131600718467729},{"item":"68791","score":0.624462038351694},{"item":"72378","score":0.5269765094008626},{"item":"85131","score":0.29198666089255343},{"item":"67197","score":0.16412780810560743}]}
더 자세한 빠른 시작 전체 참조를 확인하세요.
질문이 있으시면 주저하지 말고 Slack에 가입하세요!
이 프로젝트는 라이센스 파일에 지정된 대로 Apache 2.0 라이센스에 따라 릴리스됩니다.