Skip to main content

🏥 Patient Query Assistant with RAG + OpenAI API

A Python-based MCP Server that answers patient-specific medical queries using a Retrieval-Augmented Generation (RAG) system integrated with the OpenAI Chat Completions API.
The function retrieves context-specific medical data about a patient from an Azure AI Search (a Vector Database), and uses an LLM to generate precise, context-aware responses.


📖 Overview

This utility allows you to query a patient's medical information by providing:

  • patient_name: The name of the patient (as a string).
  • query: The natural language question you want to ask (as a string).

The system normalizes the patient’s name by removing spaces and converting it to lowercase, retrieves relevant data using an indexer, and sends this context along with your query to an OpenAI model to generate a smart, human-readable response.


🛠️ Features

✅ Patient name normalization (removes spaces and lowercases for consistent lookups)
✅ Retrieval-Augmented Generation (RAG) powered by Azure AI Search and Storage Accounts ✅ Natural language interaction via OpenAI Chat Completions API
✅ Designed for secure and context-aware medical information handling


Metadata

Release files for ho-rag 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ho-rag 1.0.0
File Size Uploaded Provenance
ho_rag-1.0.0.tar.gz 4.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ho-rag 1.0.0
File Interpreter ABI Platform
ho_rag-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / ho_rag-1.0.0.tar.gz

Download URL ho_rag-1.0.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f74680df625188a0a8580f3aa870b3ebe74b15d5746f4c1417000f1c5133b27d
BLAKE2b-256 checksum
How to use checksums
ebc77c7feddfd1294b08c90608607b699b1cd661bda931cc84032a2ede5bdc35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.17

Release files / ho_rag-1.0.0-py3-none-any.whl

Download URL ho_rag-1.0.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b8c00226b02d97f8b9e7e402958ebcea63f9e6d58ca4aaee971b77ef3189d29
BLAKE2b-256 checksum
How to use checksums
4eedfd82e687dccb110e6ea079db6b336fab8d7e34ff6fc1e6d8fdf533f8efab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.17

Security for ho-rag 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page