Skip to content

demo app of semantic search using embeddings vs keyword search

Notifications You must be signed in to change notification settings

bioteam/semantic-search-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Semantic Search Demo

  1. Install dependencies and setup the database
python3 -m venv venv && source venv/bin/activate && pip install -U pip
pip install -r requirements.txt
python db_setup.py
  1. Run the app and navigate to localhost:5000/
python app.py

What is This?

This demo is meant to show the difference between keyword searching and semantic search via embeddings. Semantic search is a key component of RAG workflows. Semantic search captures "what do you mean" rather than simple looking for keywords. This can better capture context and lead to more relevant results.

Here are a few example searches that can demonstrate this:

  1. "Cell death avoidance in cancer" (semantic will find papers about apoptosis evasion)
  2. "How tumors create their own blood supply" (semantic will find angiogenesis papers)
  3. "Immune system fighting cancer cells" (semantic will find immunotherapy papers)
  4. "Cancer cells spreading to other organs" (semantic will find metastasis papers)

About the Data

We pulled and embedded abstracts and titles from Pubmed for a list of keywords related to "cancer" for this demo. See db_setup.py for more info.

    cancer_topics = [
    "cancer immunotherapy", 
    "metastasis mechanisms",
    "tumor microenvironment",
    "oncogene signaling pathways",
    "cancer stem cells",
    "apoptosis evasion in tumors",
    "angiogenesis in cancer"]

About

demo app of semantic search using embeddings vs keyword search

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published