# TBAid: A domain-restricted diagnostic assistant for tuberculosis awareness and patient support using OpenRouter API Integration

**Authors:** Lakshmi Ravi Teja Meka, Dalwinder Singh, Arun Singh, Saiprasad Potharaju, M.V.V. Prasad Kantipudi, Swathi Gowroju

PMC · DOI: 10.1016/j.mex.2026.103819 · MethodsX · 2026-02-11

## TL;DR

TBAid is a chatbot designed to provide tuberculosis awareness and health advice, especially for low-resource areas.

## Contribution

The dual-explanation capability for both patients and healthcare workers is a novel feature of TBAid.

## Key findings

- TBAid uses a rule-based system and Hugging Face API for TB-focused responses.
- The chatbot can be deployed locally or online, making it accessible in rural areas.
- The system is modular and can integrate with CT-based TB diagnostic models.

## Abstract

This research introduces a study of a domain-specific intelligent assistant, TBAid, that is a conversational chatbot to assist with tuberculosis (TB) awareness and health advice. A structured rule-based system integrated with the Hugging Face Inference API using the Qwen/Qwen2.5-72B-Instruct large language model provides TB-focused responses to structured user queries. TBAid is designed to increase public awareness in low-resource and rural areas. It specifically targets communities with poor access to specialist consultations and medical report interpretation. A key novelty of the assistant is its dual-explanation capability, which can frame responses for a non-expert user (e.g., a patient) or provide a medically precise version for healthcare workers. This ensures answers are both accessible and clinically safe by remaining strictly domain-relevant. While the chatbot does not currently analyze images directly, its architecture is designed for future integration. It can accept predictive outputs from a separate, pre-existing CT-based TB classification model. It has a user interface written in HTML, CSS, and JavaScript, and can be deployed on GitHub as a static web app or a local Flask server. This framework enables real-time access and secure decision-making. It is modular, scalable, and can be integrated with AI-based medical diagnostics in the future.•Combines rule-based logic and conversational AI for domain-specific TB support.•Enhances accessibility through lightweight, local, and online deployments.•Supports modular expansion for integration with CT-based diagnostic outputs.

Combines rule-based logic and conversational AI for domain-specific TB support.

Enhances accessibility through lightweight, local, and online deployments.

Supports modular expansion for integration with CT-based diagnostic outputs.

Image, graphical abstract

## Linked entities

- **Diseases:** tuberculosis (MONDO:0018076)

## Full-text entities

- **Genes:** INS (insulin) [NCBI Gene 3630] {aka IDDM, IDDM1, IDDM2, ILPR, IRDN, MODY10}
- **Diseases:** infectious (MESH:D003141), Type 1 (MESH:D003922), heart disease (MESH:D006331), Loss of appetite (MESH:D001068), TB (MESH:D014376), Type 2, (MESH:D003924), CT (MESH:C000719218), miliary tuberculosis (MESH:D014391), cough (MESH:D003371), Weight loss (MESH:D015431), COVID-19 (MESH:D000086382), pulmonary TB (MESH:D014397), heart attack (MESH:D009203), infected (MESH:D007239), deaths (MESH:D003643), hallucinations (MESH:D006212), Fever (MESH:D005334), night sweats (MESH:D013543), pneumonia (MESH:D011014), Chest pain (MESH:D002637), Cavitating lesion (MESH:D009059), Gestational Diabetes (MESH:D016640), AI (MESH:C538142), LLM (MESH:D007806), pleural effusion (MESH:D010996), anxiety (MESH:D001007), diabetes (MESH:D003920), weakness (MESH:D018908), lung disease (MESH:D008171), tumors (MESH:D009369), pain (MESH:D010146), respiratory illnesses (MESH:D012140), fibrosis (MESH:D005355), lung infection (MESH:D012141), inflammation (MESH:D007249)
- **Chemicals:** glucose (MESH:D005947), TBAid (-), blood sugar (MESH:D001786), cholesterol (MESH:D002784), sugar (MESH:D000073893), vitamin D (MESH:D014807)
- **Species:** Homo sapiens (human, species) [taxon 9606], Mycobacterium tuberculosis (species) [taxon 1773]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12936838/full.md

## Figures

8 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12936838/full.md

## References

33 references — full list in the complete paper: https://tomesphere.com/paper/PMC12936838/full.md

---
Source: https://tomesphere.com/paper/PMC12936838