CA

CarePulse GenAI

LIVE WORKING APP

Clinical Discharge & Lab Report Plain-Language AI

Python 3.12 FastAPI SSE LangGraph Qdrant Vector DB Hybrid RAG Actions:

Doctor Directory, Live Slot Booking & Token Issuance

Live OPD Consultation & Diagnostic Sample Queue

🩺 Digital E-Prescription Generator

PATIENT-FRIENDLY LAB & DISCHARGE SIMPLIFIER

LangGraph Multi-Agent Trace & RAG Telemetry

Live request/response telemetry captured from every interactive action in this session.

FastAPI-SSE/0.115 (LangGraph + Qdrant SQ8 Hybrid RAG)

API Endpoint Contracts

GET /api/v1/clinical-rag/doctors
List doctors, specialties, live OPD slots & queue wait times
POST /api/v1/clinical-rag/appointments
Book slot & issue live OPD / sample token
PATCH /api/v1/clinical-rag/queue/{id}/status
Advance patient consultation / lab report workflow
POST /api/v1/clinical-rag/prescriptions
Generate structured digital prescription or patient summary
carepulsegenai_graph.py PYTHON
from langgraph.graph import StateGraph, END

graph = StateGraph(AgentState)
graph.add_node("normalize_input", normalize_node)
graph.add_node("hybrid_retrieve", qdrant_bm25_retriever)
graph.add_node("guardrail_check", owasp_safety_guard)
graph.add_node("synthesize_structured", pydantic_v2_synthesizer)
graph.set_entry_point("normalize_input")
graph.add_edge("normalize_input", "hybrid_retrieve")
graph.add_edge("hybrid_retrieve", "guardrail_check")
graph.add_edge("guardrail_check", "synthesize_structured")
graph.add_edge("synthesize_structured", END)
app_agent = graph.compile()

Architecture Highlights

  • ✓ Python 3.12 + FastAPI async gateway with Server-Sent Events (SSE) token streaming
  • ✓ Qdrant vector store + BM25 sparse fusion + Cross-Encoder reranking pipeline
  • ✓ LangGraph multi-node stateful agent with deterministic verification & retry edges
  • ✓ Redis semantic prompt cache + strict Pydantic v2 schema validator
  • ✓ Automated RAGAS / DeepEval CI pipeline + Langfuse observability tracing

Live Persisted State Snapshot (JSON)


        

CarePulse GenAI — Medical Report & Discharge Summary Simplifier

CarePulse GenAI is a complete production Generative AI web platform built with Python 3.12, FastAPI SSE streaming, LangGraph multi-agent orchestration, and Qdrant Hybrid RAG. It turns raw unstructured documents, voice/text queries, and domain knowledge bases into cited, schema-validated answers buyers can deploy immediately or customize for their own business data.

RAGAS Faithfulness 94.6%
P95 TTFT Latency 420 ms
API Cost Saved -54%
Guardrail Pass 100%
MODULE 01 • LIVE

Document & Knowledge Ingestion Pipeline

Automated PDF/Markdown/JSON chunking, metadata tagging, semantic deduplication, and Qdrant SQ8 vector indexing.

✓ Processes 500+ page packs in under 18 seconds

MODULE 02 • LIVE

Hybrid Dense + BM25 Retrieval & Reranker

Fuses dense embeddings with lexical BM25 scores and cross-encoder reranking so exact domain terms and numbers are never missed.

✓ 94.6% RAGAS context precision across test suites

MODULE 03 • LIVE

LangGraph Stateful Multi-Agent Workflow

Routes user requests across planner, retriever, deterministic verifier, and fallback retry nodes with full state checkpoints.

✓ Cuts unsupported hallucinations to < 1.2%

MODULE 04 • LIVE

Pydantic v2 Structured Output & Guardrails

Enforces strict JSON output contracts, PII redaction, and prompt-injection sanitizers before sending any response to the UI.

✓ 100% schema conformance & OWASP LLM pass

MODULE 05 • LIVE

FastAPI SSE Streaming & Citation Viewer

Streams tokens in real time alongside clickable source clause highlights, confidence scores, and exportable summary cards.

✓ Sub-430ms Time-To-First-Token (TTFT)

MODULE 06 • LIVE

Semantic Cache & Langfuse Cost Monitor

Caches semantically equivalent queries in Redis while logging token usage, latency spans, and RAGAS eval regressions.

✓ 54% lower LLM API cost per active user