CruxBit
Back to catalog
MediumTechnologyhealthcare

Patient Support Chatbot With Persistent Conversation Memory

Added Jun 2025 3 design docs

Patients managing ongoing conditions interact with healthcare systems repeatedly, yet every phone line and web chat treats them as strangers: they re-explain their situation, repeat their medication list, and restate last week's question. Stateless AI chatbots reproduce this failure. For a health assistant to be genuinely supportive it must remember, both within a conversation and across sessions, while handling medical topics with appropriate caution.

The intern builds a healthcare chatbot with exactly this dual memory architecture. The service is written in Python on FastAPI, with LangChain providing the conversation framework and OpenAI models generating responses. Temporary memory maintains context within a session so follow-up questions resolve naturally, while permanent memory persists key facts across sessions, such as topics previously discussed and preferences expressed, so a returning patient continues rather than restarts. The intern implements both memory layers, the retrieval logic that decides what past context is relevant to the current message, and the safety framing that keeps responses informational, encourages professional consultation, and avoids diagnostic overreach.

The project demonstrates conversation-state engineering, a defining skill of production chatbot work: memory design, context-window management, and responsible handling of a sensitive domain.

Related projects

You might also like

TechnologyMedium

Retrieval-Augmented Answer Engine for Clinical Reference Documents

General-purpose AI assistants are unusable for serious healthcare questions because their answers cannot be traced to authoritative sources. Clinics and health organizations hold exactly the documents that should ground such answers, including internal protocols, clinical references, and patient-education material, but need a system that confines the AI to that corpus. Retrieval-augmented generation is the architecture that makes this possible, and building it well over medical content is a benchmark skill for AI engineers. The intern builds a complete RAG application for the healthcare domain as a Python FastAPI service. The pipeline combines LangChain for orchestration with LlamaIndex for document ingestion and indexing: medical reference documents are chunked, embedded, and stored for semantic retrieval, and incoming questions trigger retrieval of the most relevant passages before generation. The system supports both OpenAI and Llama models as the generation backend, and the intern implements comparison plumbing to evaluate grounding quality across both. Answers carry citations back to source passages, and the intern tunes chunking, retrieval depth, and prompt constraints to minimize unsupported claims. The project demonstrates end-to-end RAG construction, dual-framework integration, model-backend flexibility, and the evidence-first mindset that domain-specific AI requires.

healthcarefastapigenerative-ailangchain+4
PRD · HLD · LLD includedView
TechnologyEasy

Lightweight Text Generation API Built With LangServe

The gap between a working LangChain script and a service other software can call is deployment, and LangServe exists to close it: it turns chains into REST APIs with typed endpoints, streaming, and an interactive playground almost for free. Knowing this path from notebook to network service is essential for any developer who wants their AI work used by anyone other than themselves, and this project walks it end to end at a friendly scale. The intern builds a FastAPI project in Python that exposes a text generation chain through LangServe. The intern first constructs the chain itself with LangChain, a prompt template feeding a language model with configurable parameters such as topic and style, then mounts it as a LangServe route, gaining automatically generated endpoints for invocation, batching, and streaming. Around this core the intern adds a health check, request logging, and clear API documentation, then exercises the service from the built-in playground and from an external client script to prove the full round trip works. The project teaches deployment fundamentals for LLM applications: how chains become HTTP services, how FastAPI and LangServe divide responsibilities, what streaming responses look like on the wire, and how to structure a small AI service so that adding the next endpoint is easy, foundations the intern will reuse in every production AI role.

educationfastapigenerative-ailangchain+1
PRD · HLD · LLD includedView
TechnologyMedium

Knowledge Retrieval Service for Energy Sector Documents on Vertex AI

Energy companies manage some of the densest documentation in industry: grid compliance filings, environmental impact assessments, turbine maintenance manuals, and regulatory correspondence spanning decades. Engineers and analysts lose hours locating provisions inside these archives, and institutional knowledge walks out the door with every retirement. A retrieval system that answers plain-language questions from this corpus, hosted on infrastructure the company already trusts, addresses both problems at once. The intern builds this knowledge retrieval service as a cloud-based application on Google Cloud's Vertex AI. Documents are processed and embedded into a vector index, and a Python pipeline built with LangChain performs retrieval-augmented generation: fetching the passages relevant to a query and composing answers through OpenAI and Vertex AI models with citations back to the source documents. The intern implements the document processing workflow, the retrieval configuration tuned for long technical documents, and the query API through which analysts interact with the system, all deployed and running on GCP services. The project demonstrates cloud-native AI engineering: building RAG on a managed ML platform, handling industrial document collections, and delivering grounded question answering with the citation discipline that regulated sectors require.

energygcpgenerative-ailangchain+2
PRD · HLD · LLD includedView