Metarank: การปรับเปลี่ยนในแบบของคุณแบบเรียลไทม์เป็นบริการ
Metarank เป็นบริการจัดอันดับแบบโอเพ่นซอร์ส สามารถช่วยคุณสร้างการค้นหาและคำแนะนำเชิงความหมาย/ประสาทส่วนบุคคล
หากคุณเพียงต้องการเริ่มต้น ให้ลอง:
ด้วย Metarank คุณสามารถทำให้การค้นหาและคำแนะนำที่มีอยู่ของคุณ ฉลาดขึ้น :
Metarank นั้น รวดเร็ว :
ประหยัด เวลาในการพัฒนา ของคุณ:
Metarank ช่วยคุณสร้างระบบการจัดอันดับขั้นสูงสำหรับการค้นหาและคำแนะนำ:
โพสต์ในบล็อก:
การพบปะและการพูดคุยในการประชุม:
คุณสามารถเล่นกับการสาธิต Metarank บน demo.metarank.ai:
ตัวสาธิตและข้อมูลที่ใช้เป็นโอเพ่นซอร์ส และคุณสามารถรับสำเนาของกิจกรรมการฝึกอบรมและไฟล์กำหนดค่าใน repo github
ให้เราแสดงวิธีที่คุณสามารถเริ่มปรับแต่งเนื้อหาด้วยการจัดอันดับใหม่ตาม 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
ในขั้นตอนสุดท้าย เราจะใช้โหมด standalone
ของ Metarank ที่รวมการฝึกอบรมและการรัน API ไว้ในคำสั่งเดียว:
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}]}
ตรวจสอบการอ้างอิงฉบับเต็ม Quickstart แบบเจาะลึกเพิ่มเติม
หากคุณมีคำถามใด ๆ อย่าลังเลที่จะเข้าร่วม Slack ของเรา!
โปรเจ็กต์นี้เผยแพร่ภายใต้ลิขสิทธิ์ Apache 2.0 ตามที่ระบุไว้ในไฟล์ลิขสิทธิ์