- 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
- Run the app and navigate to localhost:5000/
python app.py
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:
- "Cell death avoidance in cancer" (semantic will find papers about apoptosis evasion)
- "How tumors create their own blood supply" (semantic will find angiogenesis papers)
- "Immune system fighting cancer cells" (semantic will find immunotherapy papers)
- "Cancer cells spreading to other organs" (semantic will find metastasis papers)
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"]