1 of 39

Improving News Recommendations

With Knowledge Graphs & Cloudflare Workers

William Lyon, Neo4j

@lyonwj

lyonwj.com

2 of 39

2

3 of 39

3

4 of 39

About Me

William Lyon

Developer Relations Engineer, Neo4j

​

@lyonwj

lyonwj.com

​

Co-host GraphStuff.FM podcast

​

5 of 39

What is Neo4j?

Graph Database

  • Database management system (DBMS)
  • Property Graph data model
  • Cypher query language
  • Graph analytics
  • Data visualization
  • Neo4j Aura database-as-a-service
  • GraphQL integration for building GraphQL APIs

6 of 39

The Neo4j Graph Data Platform

6

Analytics &� Data Science �Tooling

Graph �Transactions

Data Orchestration

Development & �Administration

Drivers & APIs

Discovery & Visualization

Graph �Analytics

AI

BUSINESS USERS

DEVELOPERS

ADMINS

DATA�ANALYSTS

DATA�SCIENTISTS

APPLICATIONS

Cloud

7 of 39

Personalization

& Recommendations

7

8 of 39

8

9 of 39

9

10 of 39

Knowledge Graphs For Personalization

10

11 of 39

What is a knowledge graph?

What is a graph?

12 of 39

What Is A Graph?

13 of 39

What Is A Property Graph?

14 of 39

What Is A Knowledge Graph? Knowledge graphs put things in context

15 of 39

News As A Knowledge Graph

Using The NYTimes API

Requirements:

  • View articles
    • Most recent
  • Search articles
    • Keyword, date range
  • Comments
  • Save articles
  • Personalized recommendations
    • My interests
    • Location-based

16 of 39

17 of 39

18 of 39

GitHub Actions - Flat Graph

19 of 39

Recommendations With Graphs

Content-Based Filtering

​

Recommend items that are similar to those that a user is viewing, rated highly or purchased previously.

Collaborative Filtering

​

Use the preferences, ratings and actions of other users in the network to find items to recommend.

19

19

20 of 39

Collaborative Filtering Leveraging The Wisdom Of Crowds

​

  1. Find similar users, my peer group, my cluster in the graph, etc
  2. What actions have those users taken that I haven't (yet!)?

Cosine Similarity

Pearson Similarity

21 of 39

Cold Start Problem

22 of 39

Content Based Recommendations

23 of 39

Personalization At The Edge

With Cloudflare Workers & Neo4j

23

24 of 39

Cloudflare Workers For Personalization

Why are Workers good for personalization?

  • Geolocation aware
  • Performance
    • Globally distributed CDN
    • Scaling
    • No cold starts
  • Leverage other Cloudflare services
    • Bot detection scoring
    • Caching
    • ...

25 of 39

26 of 39

Getting Started With Cloudflare Workers & Neo4j

27 of 39

Getting Started With Cloudflare Workers & Neo4j

28 of 39

Getting Started With Cloudflare Workers & Neo4j

29 of 39

29

30 of 39

30

31 of 39

31

32 of 39

32

33 of 39

34 of 39

Resources

34

35 of 39

Neo4j Sandbox

36 of 39

Arrows.app

37 of 39

Neo4j Data Importer

38 of 39

Neo4j Data Journalism Accelerator Program

39 of 39

About Me

William Lyon

Developer Relations Engineer, Neo4j

​

@lyonwj

lyonwj.com

​

Co-host GraphStuff.FM podcast

​