Lab 1 · EveryCure · Knowledge Graphs

Build a Knowledge Graph &
Drug Repurposing System

In this lab you will build a simplified version of EveryCure's AI system — storing drug-disease-target relationships, finding connections, and scoring potential repurposing opportunities. No prior coding experience required.

Claude AI Google Colab Python GitHub Pages
🔬
What you build
A drug repurposing AI
🤖
Coding tool
Claude + Colab
🌐
You publish
GitHub Pages site
📚
Prior coding needed
None
How to use Claude in this lab
Use Claude as a tutor, not a contractor. When you ask for code, also ask for an explanation. If something doesn't make sense, ask Claude to explain it differently. The goal is understanding, not just working code.

Overview

In the EveryCure case, we saw how AI can help discover new uses for existing drugs by connecting information about drugs, diseases, and biological targets in a large knowledge graph. In this lab, you will build a very small version of that idea.

You will use Claude to generate beginner-friendly Python code and Google Colab to run it. Your system will store relationships between drugs, diseases, and biological targets, find shared connections, and suggest possible repurposing opportunities.

This lab follows the AI Factory:

Data
Model
Prediction
Decision
Value

Tools

Create a new notebook in Colab before starting.

What You Will Build

A tiny system that:

1
Generate a Tiny EveryCure System

Go to Claude and paste this prompt:

Claude prompt
Write beginner-friendly Python code for a tiny EveryCure-style system. Include: - a small list of drugs - the disease each drug already treats - biological targets affected by each drug - biological targets linked to diseases Use dictionaries. Do not use emojis. Write code that finds possible drug-disease matches when they share a biological target. Keep the code simple and explain it step by step.

Copy the code into Google Colab and run it. You should see possible matches printed.

What this represents
This is the beginning of your knowledge graph: Drug → Target → Disease
2
Understand the Knowledge Graph

Ask Claude to explain the structure of what you just built:

Claude prompt
Explain how this program acts like a tiny knowledge graph. Explain in simple terms for a beginner.

Write a few sentences answering:

  • What are the nodes?
  • What are the connections (edges)?
  • Why do the connections matter for finding drug repurposing opportunities?
3
Add a Simple Scoring Model

Real EveryCure doesn't just show matches — it scores them. Ask Claude to add scoring:

Claude prompt
Modify the code so each drug-disease pair gets a score based on how many biological targets they share. Print the score for each match. Keep the code simple and explain the changes.

Run the updated code.

What this represents in the AI Factory
Data → connections between drugs and targets
Model → the scoring rule
Prediction → the score
Decision → which match looks most promising
4
Show Drug Repurposing Clearly

Now make the output look like a real decision tool. Ask Claude:

Claude prompt
Modify the code so the output is user friendly. For each match, print: - Drug name - Disease the drug already treats - New disease it may treat - Shared biological target - Score - A short explanation sentence Example: Drug: DrugA Currently used for: Disease1 May be repurposed for: Disease2 Shared target: TargetX Score: 1 Explanation: DrugA may help treat Disease2 because both are connected to TargetX. Keep the code beginner friendly and explain what changed.

Run the code. Your system should now clearly show repurposing candidates.

5
Expand the System

Add more data to your knowledge graph:

Claude prompt
Help me add one more drug, one more disease, and one more biological target to this system. Keep the code simple. Explain the changes as if I were a 9th grader.

Run again. You should see new matches appear based on the expanded data.

6
Publish Your System on GitHub Pages

In this course, you will sometimes create small systems using generative AI. Publishing them on GitHub lets you show your work to employers and classmates.

Step 6.1 — Create a GitHub Account

Go to github.com and create a free account if you don't already have one.

Step 6.2 — Ask Claude to Create Your Website

Claude prompt
Please make a user-friendly website for my EveryCure-style system. The page should include: - Title - Description of the system - Example output - Explanation of how the system finds drug repurposing matches Keep it simple and beginner-friendly.

Step 6.3 — Add the Website to GitHub

  1. Open GitHub and create a new repository
  2. Name it something like everycure-drug-repurposing-system
  3. Turn on README, then create the repository
  4. Click Add File → Create new file
  5. Name the file index.html
  6. Copy and paste the code from Claude and click Commit Changes
  7. Go to Settings → Pages
  8. Under Branch, click main, make sure /root is enabled, and click Save
  9. Wait a minute — your URL will appear under Pages. Save it.
7
Connect Back to the EveryCure Business Case

Answer these questions in writing:

  • How is your system similar to EveryCure?
  • How is it simpler? What is missing?
  • Why is a knowledge graph useful for this kind of problem?
  • Why is this hard for humans to do manually?
  • What real data would EveryCure need that your system doesn't have?
8
Map to the AI Factory

Fill in the AI Factory for your system and explain each step in 1–2 sentences:

Data →
Model →
Prediction →
Decision →
Value
9
Reflection on Using Generative AI

Answer these questions about your experience using Claude as a coding partner:

  • How did Claude help you in this lab?
  • What did you understand well by the end?
  • What was still confusing?
  • Did Claude ever give you code that didn't work or was hard to understand? What did you do?
What to Submit
← Back to Case Study Chapter 2: Netflix →