real-time recommendations and the future of search
Post on 09-Feb-2017
1.468 Views
Preview:
TRANSCRIPT
and the Future of Search
GraphAware®
graphaware.com
@graph_aware
Real-Time Recommendations
Michal Bachman
News you should readBooks you should buyPeople you may knowPeople you should datePeople you should market a product to…
Recommendation Engines
GraphAware®
Clinical Trial MatchingLaw EnforcementEvent PlanningCareer Planning…
Recommendation Engines
GraphAware®
Content-based (features)Collaborative filtering (user <—> item relationships)
Recommendation Engines
GraphAware®
Example
IS_OF_GENRE
title: “Love Actually”
Movie
name: “Bob”
User
name: “Comedy”
Genre
RATEDrating: 5
name: “Alice”
Username:
“Romance”
Genre
title: “American Pie”
Movie
IS_OF_GENRE
IS_OF_GENRE
RATEDrating: 5
INTERESTED_IN
rating: 5RATED
GraphAware®
Global viewPre-computed (analytical)Lacks transparencyInflexibleLacks context
Traditional Approach
GraphAware®
Cypher Query Example
MATCH (u:User {id:1})-[:LIKED]->(m:Movie), (m)<-[:LIKED]-(another:User), (another)-[:LIKED]->(reco:Movie)
WHERE NOT (u)-[:LIKED|DISLIKED]->(reco)
RETURN reco;
GraphAware®
Requirements of real-world recommendation engines are often much more complex.
The Reality
GraphAware®
After a brainstorming session, your team came up with the following ways of finding people one may know:
Example
GraphAware®
Common contactsFacebook friends in commonEmail / mobile contacts in commonEach others email / mobile contactWorked for the same companyStudied at the same schoolShare the same interestLive in the same city
People You May Know
GraphAware®
More contacts in common = better chance?Same city / school / company = does size matter?What about emails that don’t represent a person?What about people already connected? And pending… And rejected…And repeatedly ignored…
People You May Know
GraphAware®
Discover
GraphAware®
IS_OF_GENRE
title: “Love Actually”
Movie
name: “Bob”
User
name: “Comedy”
Genre
RATEDrating: 5
name: “Alice”
Username:
“Romance”
Genre
title: “American Pie”
Movie
IS_OF_GENRE
IS_OF_GENRE
RATEDrating: 5
INTERESTED_IN
rating: 5RATED
Score
GraphAware®
IS_OF_GENRE
title: “Love Actually”
Movie
name: “Bob”
User
name: “Comedy”
Genre
RATEDrating: 5
name: “Alice”
Username:
“Romance”
Genre
title: “American Pie”
Movie
IS_OF_GENRE
IS_OF_GENRE
RATEDrating: 5
INTERESTED_IN
rating: 5RATED
Remove Irrelevant
GraphAware®
IS_OF_GENRE
title: “Love Actually”
Movie
name: “Bob”
User
name: “Comedy”
Genre
RATEDrating: 5
name: “Alice”
Username:
“Romance”
Genre
title: “American Pie”
Movie
IS_OF_GENRE
IS_OF_GENRE
RATEDrating: 5
INTERESTED_IN
rating: 5RATED
Measure Quality
GraphAware®
Recommendation: 33812631-079d-11e5 Input: 323423 Output: 99338 FriendsInCommon: 0.75 (raw value: 4) SkillsInCommon: 0.50 SameLocation: 1.00 AgeDifference: -0.25 Total: 2.00 Outcome: 1
public class PeopleYouMayKnow extends Neo4jTopLevelDelegatingRecommendationEngine { @Override protected List<RecommendationEngine<Node, Node>> engines() { return Arrays.<RecommendationEngine<Node, Node>>asList( new SharedEmployment(), new ConnectionsInCommon(), new MobileContacts(), new ReverseMobileContacts(), new MobileContactsInCommon(), new SharedStudies() ); } @Override protected List<PostProcessor<Node, Node>> postProcessors() { return Arrays.<PostProcessor<Node, Node>>asList( new RewardSameCity(), new RewardSameState(), new PenalizeAlreadySeen() ); } @Override protected List<BlacklistBuilder<Node, Node>> blacklistBuilders() { return Arrays.asList( new ExcludeSelf(), new ExistingRelationshipBlacklistBuilder(CONNECTED, BOTH), new ExistingRelationshipBlacklistBuilder(INVITED, OUTGOING), new ExistingRelationshipBlacklistBuilder(REJECTED, BOTH) ); } @Override protected List<Filter<Node, Node>> filters() { return Arrays.<Filter<Node, Node>>asList( new PrivacySettingTooHigh() ); }}
GraphAware®
plugin to Neo4j (uses GraphAware Framework)you can use Cypher or a JVM-languageopinionated architecturevery fastvery flexiblehandles all the plumbing
GraphAware Reco
GraphAware®
Closer users on topProducts likely to buy on top…
Requirements
GraphAware®
=> Recommendation Engine with a constrained set of possible recommendations
Example
IS_OF_GENRE
title: “Love Actually”
Movie
name: “Bob”
User
name: “Comedy”
Genre
RATEDrating: 5
name: “Alice”
Username:
“Romance”
Genre
title: “American Pie”
Movie
IS_OF_GENRE
IS_OF_GENRE
RATEDrating: 5
INTERESTED_IN
rating: 5RATED
GraphAware®
Process of finding the most relevant results of a search query by combining the relevancy scores produced by a search engine with those produced by a graph-based recommendation engine.
Graph-Aided Search
GraphAware®
Graph-Aided Search
GraphAware®
Application
Write
Replicate(async)
ResultsBoostOK
Scores
Search
Recommendation Engine
Neo4j to Elasticsearch Elasticsearch to Neo4j
GraphUnit& RestTest
UUID WarmUp Auditing Importer
GraphAware Framework
GraphAware®
Reco EngineElasticsearch Integration
TimeTree Algorithms NodeRank
Open Source (GPL)ActiveProduction ReadyGithub: github.com/graphaware
Our Web: graphaware.com
Maven Central
GraphAware Framework
GraphAware®
Try itGive us feedbackContributeBuild your own modulesGet in touch for support / consultancy
GraphAware Framework
GraphAware®
top related