Knowledge Graphs --Enter--> The Hype Cycle (PyData 2019)
So you have heard the hype about knowledge graphs? How can Pythonistas join forces with Fashionistas to form an authoritative single source of truth for fashion e-commerce, benefiting applications such as Search, Discovery, and Personalisation. This talk will give you a unique insight into how knowledge graphs can provide powerful ways to analyse and emphasise relationships in data.
At Farfetch, we are building a Fashion Knowledge Graph to form a rich, authoritative source of fashion knowledge to enhance applications such as search. In this talk, we describe the directions we are investigating in building and using such a graph, including using Python in harvesting product knowledge from the web, human-in-the-loop knowledge learning, and graph-enhanced search. This talk will present our progress in these directions, explore the challenges in an enterprise environment, and show the exciting research opportunities.
Outfit available from
Farfetch at a glance
Employees across 13 countries
Gross Merchandise Value
Brands available for consumers
Luxury sellers on the
AOV on Marketplace
> 2.9 Million*
Orders on Marketplace
Active Marketplace consumers
Size of personal luxury good
industry (Bain estimates)
*Correct for full year 2018 **As at Q1 2019
Marketplace language sites
What is this graph thing?
“Hey, I’ve got this lit bar graph visualization for you! It’s 🔥🔥🔥!”
A New Perspective: Emphasising Relationships
● Businesses and their products/services are all about Entities and Relationships
● Examples of entities and relationships in industry:
Farfetch Consumer searches Product with Terms
Amazon Seller sells Product to Consumer
Uber Driver provides Trip to Rider
Facebook Person shares Status with Friend
● How can we represent, analyse, and visualise this kind of data?
What is a knowledge graph?
A knowledge graph can describe
● a collection of nodes (entities) representing business and fashion entities
● and with labeled relationships between the nodes
Language = “EN”
● each containing information (properties)
ProductID = 123
Discovering the pearl
DELFINA DELETTREZ 'Trillion' earring
Discovering the diamond
JIMMY CHOO Diamond sneakers
Generic vs Domain Specific Knowledge Graphs
Generic vs Domain Specific
Example Use Cases
Free Text Search
Increase product discovery with
synonyms and rich attributes for
material, occasion (e.g. skiing), etc.
Increase product discovery based
by using graph to understand
Leverage rich product connections to
increase relevance on listing pages
Increase relevance based on richer
product attributes and deep graph
Building the fashion knowledge graph
Search Recommendations ...
(Associates taxonomy entities with business entities)
AI Knowledge cleaning Entity resolution Schema mapping
Expert Knowledge Data-Driven Insights
Universal Fashion Taxonomy
Textile Cotton Denim
Why use Pyenv + Pipenv for your projects?
● Officially recommended way of managing project
● No requirements.txt and managing virtualenvs
● Instead a Pipfile in your project that performs this stuff
$ pip install -U pipenv # Install Pipenv
$ cd my_project # Go to your
$ pipenv install # Initialize Pipenv
$ pipenv install neo4j # Install a package
$ pipenv shell # Enter virtual env
$ python my_script.py # Run a script
Communicating a graph
“How can we improve the
“How much can the
knowledge graph impact
“Wow, looks like a NN,
hold my Pandas 🐼🐼🐼,
“Why do we need a
“Which graph database
meets the requirements?”
“Is your Airflow dizzy? It’s
traversing through cyclic
Where do I see most value
with the knowledge graph?
● Improving customer experience such as
by understanding consumer intent in search
● Connecting further business entities (e.g.
content) for hyper-personalisation
● Deriving new knowledge via graph
analysis and graph-based AI
● Enabling new, innovative applications
Why use a knowledge graph?
● Have naturally highly connected-data
● Derive new insights with Graph Analysis & Graph-based AI
● Enable stakeholders to easily visualise relationships and make informed decisions
● Flexible schema to facilitate evolution to expand business entities
● Optimized for storing and querying graphs
○ Significantly faster than SQL databases for querying relationships
○ Relationships are a fundamental structure, so following relationships is a
single lookup, making this operation blazingly fast
The Tool to Create Professional Websites
From Markdown, Jupyter, and RStudio
100,000+ websites. 2,000+ GitHub Stars. 80+ Contributors. 40+ Widgets, Themes, and Languages.
Used by academics and labs at Stanford, MIT, Cambridge. Featured on GitHub’s Blog.
Install Hugo as Prerequisite
○ choco install hugo-extended -confirm
○ brew update && brew install hugo
○ sudo snap install hugo --channel=extended/stable
Build your site with Academic
1. Fork https://github.com/sourcethemes/academic-kickstart
2. Setup and view your site locally:
a. git clone https://github.com/<YOUR-USERNAME>/academic-kickstart.git My_Website
b. cd My_Website
c. git submodule update --init --recursive
d. cp -av themes/academic/exampleSite/* .
e. hugo server
3. Edit your Markdown content in Jupyter Labs, Visual Studio Code, or Typora
4. Commit and push your changes to GitHub
5. Go to Netlify.com and select the repository to publish