Mental Health Chatbot — RAG over PubMed

The project sits at the intersection of AI, psychology, and neuroscience. The chatbot links neurotransmitters (dopamine, serotonin, GABA, glutamate, norepinephrine, acetylcholine, endorphins) to mood disorders (depression, anxiety, bipolar, schizophrenia, OCD, PTSD), and surfaces how nutrition, exercise, and lifestyle affect well-being. Architecture flowchart LR subgraph DATA["Data Acquisition"] P["PubMed viaNCBI Entrez"] -->|"MeSH queries:6 disorders × 7 NTs"| J["1,500+ abstracts(JSON on disk)"] end subgraph IDX["Indexing"] J --> D["LlamaIndexDocuments"] D -->|"SentenceSplitter512 tok / 50 overlap"| C["Chunks"] C --> E["BioBERTembeddings"] E --> F["FAISSIndexFlatL2"] end subgraph CHAT["Chat Engine"] Q["User question"] --> CE["CondenseQuestionChatEngine"] MB["ChatMemoryBuffer600 tokens"] -.-> CE CE -->|"condensed query"| F F -->|"top-k = 3 chunks"| LLM["Phi-2 Orange Q4_K_Mvia llama.cpp"] LLM --> ANS["Answer"] end subgraph EVAL["Evaluation"] BA["BioASQ-13b100 questions"] --> R["RAGAS+ BertScore"] ANS --> R R --> M["Correctness: 0.60BertScore: 0.67"] end Data acquisition — 1,500+ PubMed abstracts scraped via Biopython Entrez. MeSH queries built from a Cartesian product of 6 disorders (depression, anxiety, bipolar, schizophrenia, OCD, PTSD) × 7 neurotransmitters (dopamine, serotonin, GABA, glutamate, norepinephrine, acetylcholine, endorphins), persisted as JSON. Indexing — BioBERT embeddings (biomedical NLI/STS fine-tune) feeding a FAISS IndexFlatL2 vector store; SentenceSplitter with 512-token chunks and 50-token overlap. Retrieval + generation — LlamaIndex CondenseQuestionChatEngine with a ChatMemoryBuffer for multi-turn follow-ups; local quantized GGUF LLM (Phi-2 Orange Q4_K_M) via llama.cpp. No paid APIs at inference time. Evaluation — RAGAS AnswerCorrectness against the first 100 BioASQ-13b training questions and their cited PMIDs, with the same local Phi-2 model wrapped as the judge. Key design decisions Local quantized model for reproducibility and zero API cost. The small context window directly shaped top-k, chunk size, and memory-buffer choices. BioBERT over generic sentence-transformer — domain match beat model size for jargon-dense PubMed text. FAISS IndexFlatL2 (exact search) at sub-1k vectors removes recall variance as a confound when tuning the rest of the pipeline. BioASQ for evaluation — peer-reviewed biomedical QA benchmark with curated answers, a stronger signal than self-generated ground truth. Results Final evaluation on the BioASQ-13b subset: ...

May 17, 2025

SHERPA — Semi-Structured RAG (UIUC CS 546)

A graduate research project at UIUC (CS 546, Fall 2024) proposing SHERPA — a semi-structured non-parametric memory framework that integrates a knowledge graph with a hierarchical vector store to improve retrieval-augmented generation. Five-person team; this page covers my two contributions: Query Classification and Entity-Relation Extraction. The interesting story isn’t the destination — it’s the experimental funnel. Both contributions involved walking through multiple wrong-fits before landing on the architecture that shipped. ...

December 19, 2024

National Center for Supercomputing Applications

Context At NCSA, I worked on improving reasoning and retrieval in biomedical AI systems by incorporating knowledge graphs into LLM workflows. The research focused on building a structured knowledge base of genes, phenotypes, and biomedical relationships to support causal question-answering over CRISPR perturbation data. What I Built I built a Neo4j knowledge graph with 100K+ biomedical triples by harmonizing Monarch ontology data, creating a structured layer for multi-hop reasoning over biomedical entities. ...

July 1, 2025

University of Illinois Urbana-Champaign

Context For my UIUC research project, I worked on SHERPA, a semi-structured RAG framework designed to improve retrieval and reasoning by combining unstructured biomedical text with structured knowledge graphs. Traditional RAG systems rely heavily on vector search over unstructured documents. Our goal was to explore whether adding structured memory through entity-relation extraction and knowledge graph construction could improve retrieval fidelity, reasoning, and answer quality for biomedical question answering. What I Built My contribution focused on two components: query classification and NER / relation extraction for triplet generation. ...

August 1, 2023