On-device conversational agent for psycho-oncology based on acceptance and commitment therapy manuals
Psychological distress is highly prevalent among individuals diagnosed with cancer, yet access to specialist psycho-oncology services remains limited by workforce shortages, geographical barriers, and concerns about privacy. This study presents a fully on-device conversational agent that combines Retrieval-Augmented Generation with a curated corpus of Acceptance and Commitment Therapy (ACT) manuals to deliver evidence-grounded emotional support without reliance on cloud resources. Multiple ACT guides and workbooks are parsed using PyMuPDF, segmented into 250-character chunks via a token-aware recursive splitting strategy, and embedded with all-MiniLM-L6-v2 sentence transformers. The resulting are indexed in a FAISS IndexFlatIP store. At inference, LangChain retrieves and ranks the top-k passages, while LangGraph enforces source fidelity before passing the context to a locally hosted llama3 model served via ChatOllama. Preliminary interactions suggest that the agent delivers concise, empathic responses referencing core ACT processes, while attaching inline citations that trace each claim to a specific passage. All responses are generated in real time on CPU-only hardware, preserving user privacy and making the system viable in low-resource clinical environments. Although current evaluation remains qualitative, no hallucinated citations or clinically unsafe statements are observed, indicating robust factual grounding at this early stage. Future work will add psycho‑oncology texts, enable optional web search for unseen queries, and run concordance studies with psycho‑oncologists to measure accuracy, tone, and usability. This lightweight offline pipeline therefore paves the way for privacy‑preserving chatbots that enhance psychosocial care in oncology and other mental‑health settings.
Institutions
- Universidad Autónoma de Zacatecas "Francisco García Salinas" (MX)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2025-09-30
- DOI
- https://doi.org/10.5281/zenodo.17237142
- Primary Topic
- Digital Mental Health Interventions
- Type
- article
- Field-Weighted Citation Impact
- 0.00