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

PII-Aware Sentiment & Topic Pipeline

An end-to-end NLP system that classifies product feedback by sentiment and topic, redacts PII before any transformer sees the text, and corrects for sarcasm — a failure mode transformer sentiment models systematically miss. Same InferencePipeline instance powers both the REST API and the UI; no logic forks between surfaces. Architecture flowchart LR T["Raw feedback text"] --> R["Redaction(8 PII categories)"] R --> P["Preprocessing(lowercase, URL/mention strip)"] P --> S["Sentiment(RoBERTa 3-class)"] P --> TC["Topic(keyword classifier)"] S --> SA["Sarcasm Adjustment(regex + heuristics)"] SA --> RES["Structured resultsentiment + topic + confidences+ redaction_summary + latency"] TC --> RES RES --> API["FastAPIPOST /predict"] RES --> UI["Streamlit UI"] Each stage is an independently testable component and can be swapped at runtime via constructor injection. replace_* methods on InferencePipeline allow hot-swapping any stage without rebuilding — useful for A/B comparisons and evaluation harnesses. ...

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

Crop Recommendation & Soil Moisture Pipeline

A two-part agricultural decision-support project. Part 1 is a 22-class crop classifier that recommends what to grow given soil + climate features. Part 2 is the data pipeline that would feed the classifier from real-world sensors and weather services — built around the Penman-Monteith evapotranspiration model. Architecture flowchart LR subgraph DATA["Data Pipeline (Part 2)"] WB["WeatherBit APIsolar_rad, dewpt,DNI, DHI, GHI,wind_spd"] --> AGG["Multi-source averaging(temp, wind across APIs)"] OW["OpenWeather APItemp, wind"] --> AGG AGG --> PM["Penman-Monteith calces, ea, VPD, delta,alpha, net Rn, G"] PM --> DB["SQLite(CRUD wrapper)"] end subgraph ML["Crop Classifier (Part 1)"] DS["Kaggle Crop Recommendation2,200 samples × 22 crops"] --> FE["Feature engineering+ Crop_Type+ Sown_Season"] FE --> SPLIT["80/20 split"] SPLIT --> NB["Gaussian Naive Bayes"] SPLIT --> RF["Random Forest"] RF --> PKL["model.pkl"] end DB -.->|"intended runtime feed"| RF PKL --> APP["Flask + Bootstrapweb app"] Part 1 — Crop classifier Data: the standard Kaggle Crop Recommendation dataset — 2,200 samples balanced across 22 crops (rice, maize, jute, cotton, coconut, papaya, orange, apple, muskmelon, watermelon, grapes, mango, banana, pomegranate, lentil, blackgram, mungbean, mothbeans, pigeonpeas, kidneybeans, chickpea, coffee), 100 per class. Features: N / P / K (soil nutrients), temperature, humidity, pH, rainfall. ...

February 15, 2024

Loan Defaulter Credit Risk — Imbalanced Classification Study

A two-notebook study on the Home Credit Default Risk dataset — the canonical real-world imbalanced classification problem (91% non-defaulters vs 9% defaulters). The interesting question wasn’t “can a model hit 99% accuracy” (a constant predict(0) already does that — and is useless). It was: for a problem where the minority class is the one that matters, which combination of techniques actually moves the needle? The work splits into a companion EDA notebook (missing-value handling, feature engineering, demographic-level defaulter analysis) and this modeling notebook. ...

January 22, 2024

IPL 2022 Analysis with Plotly

A self-directed exploration of the IPL 2022 season — partly to dig into a sport I follow closely, partly to get hands-on with Plotly specifically (subplots, hover-aware box plots, scatter-quadrant layouts) rather than my usual Matplotlib / Seaborn defaults. Published as a Medium article so the interactive charts actually render for readers. Analytical lens The notebook works through seven dimensions, organized so the per-tournament patterns set the context before drilling into per-team specifics: ...

June 15, 2022

CompFly AI

Context At CompFly AI, I work as an Applied AI Engineer across AI agent evaluation, model validation, runtime security, and agent workflow development. My work centers on a core product question: how do we measure whether an AI security system behaves deterministically before release? In agentic systems, reliability is not just about a single model response. It depends on how the system behaves across tools, memory, multi-step workflows, runtime protections, and adversarial scenarios. ...

December 1, 2025

Bayer - Internship

Context At Bayer, I interned with the Solutions team under Engineering and Data Science, working on machine learning, data engineering, and operational analytics for seed processing and field equipment operations. What I Built I built XGBoost and LightGBM regression models to predict machine-level seed processing times from historical throughput and runtime data, achieving RMSE = 35. These models supported capacity planning and maintenance scheduling for upcoming planting cycles. I also engineered ETL pipelines over 10GB+ of agronomic and equipment data from BigQuery and SQL Server, consolidating multi-year data from multiple sources and reducing retrieval latency by 40%. ...

May 1, 2024

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

Hewlett-Packard Inc.

Context At HP Inc., I spent two years as a Software Engineer in the Intelligent Automation CoE, building automation and OCR-based solutions across customer support, supply chain, commercial, and finance workflows. What I Built I automated manual, document-heavy, and data-collection processes including print usage data collection for 100+ enterprise clients across APJ using C# and SQL, and OCR-driven document processing workflows using UiPath, Tesseract, Python, and SQL for Proof of Delivery documents. ...

September 1, 2021