⭐ If Ella's RAG-based medical triage architecture gave you ideas — a star helps other health-AI builders find it. Takes 2 seconds.
ELLA
Medical Triage & Clinical RAG Engine
Ella is a production-grade Retrieval-Augmented Generation (RAG) system purpose-built for medical triage. She ingests 90,000+ clinical text chunks, embeds them via NVIDIA NIM, stores them in Pinecone, and retrieves context-grounded answers through a multi-stage pipeline — eliminating hallucinations in healthcare workflows.
Install • Quick Start • Architecture • Live Demo • Benchmark
Install
pip install ella-sdk
Quick Start
from ella_medical import Ella
client = Ella()
response = client.query("What are the symptoms of a heart attack?")
response.show()
Output:
------------------------------------------------------------
[^] TRIAGE P2
------------------------------------------------------------
Chest pain, shortness of breath, and fatigue are common...
* Chest pain or discomfort
* Numbness or tingling in the arms, back, neck, jaw
* Shortness of breath
------------------------------------------------------------
Sources
------------------------------------------------------------
[Source: Medical Handbook.pdf]: ...
------------------------------------------------------------
Usage
Basic Query
from ella_medical import Ella
client = Ella()
response = client.query("What are the symptoms of a heart attack?")
print(response.intent) # "TRIAGE"
print(response.priority) # "P2"
print(response.response) # Ella's clinical response
print(response.retrieved_context) # Retrieved medical documents
Pretty Print
from ella_medical import Ella
client = Ella()
response = client.query("What are the symptoms of a heart attack?")
response.show() # Formatted output with intent badge, response, and sources
Context Manager
from ella_medical import Ella
with Ella() as client:
response = client.query("What are the symptoms of diabetes?")
response.show()
Response Object
@dataclass
class QueryResponse:
intent: str # EMERGENCY | TRIAGE | BOOKING | GENERAL_INFO | CLOSING
priority: str # P1 | P2 | P3
thought_process: str # Router's reasoning
justification: str # Clinical justification
response: str # Ella's response
retrieved_context: str # Retrieved medical documents
Live Demo
Architecture
┌─────────────────────────────────────────────────────────────────────┐
│ USER'S INPUT │
└────────────────────────────┬────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ INTENT ROUTER (Groq llama-3.1-8b-instant + Pydantic Schema) │
│ Classifies: EMERGENCY │ TRIAGE │ BOOKING │ GENERAL_INFO │ CLOSING │
└────────────────────────────┬────────────────────────────────────────┘
│
┌──────────────┼──────────────┐
▼ ▼ ▼
┌──────────┐ ┌──────────────┐ ┌──────────┐
│ EMERGENCY│ │ TRIAGE │ │ BOOKING │
│ GUARDRAIL│ │ RAG SEARCH │ │ HANDLER │
└──────────┘ └──────┬───────┘ └──────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ RETRIEVAL PIPELINE │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────────┐ │
│ │ NVIDIA NIM │ │ BM25 │ │ CrossEncoder Reranker │ │
│ │ Embeddings │ + │ Keyword │ → │ ms-marco-MiniLM-L-6 │ │
│ │ (Semantic) │ │ Matching │ │ (Top-10 → Top-3) │ │
│ └──────┬──────┘ └──────┬──────┘ └───────────┬─────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌─────────────────────────────────────────────────────────────┐ │
│ │ PINECONE VECTOR DATABASE │ │
│ │ 90,306 vectors • cosine • 1024 dimensions │ │
│ └─────────────────────────────────────────────────────────────┘ │
└────────────────────────────┬────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ SYNTHESIS (Groq llama-3.1-8b-instant) │
│ Grounded response + clinical justification + source attribution │
└────────────────────────────┬────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────────────┐
│ PATIENT RESPONSE │
└─────────────────────────────────────────────────────────────────────┘
Benchmark
| Metric | Value |
|---|---|
| Intent Accuracy | 96.0% |
| Avg Latency | 9.26s |
| Avg Retrieval Score | 0.92 |
| Records in DB | 90,306 |
| Intent | Correct | Total | Accuracy |
|---|---|---|---|
| EMERGENCY | 10 | 10 | 100% |
| TRIAGE | 18 | 20 | 90% |
| BOOKING | 10 | 10 | 100% |
| GENERAL_INFO | 5 | 5 | 100% |
| CLOSING | 5 | 5 | 100% |
Tech Stack
| Layer | Technology | Purpose |
|---|---|---|
| SDK | ella-sdk (PyPI) |
Python client |
| Embeddings | NVIDIA NIM (nv-embedqa-e5-v5) |
1024-dim semantic vectors |
| Vector DB | Pinecone (Serverless, AWS) | Cosine similarity search |
| LLM | Groq (llama-3.1-8b-instant) |
Intent classification + response generation |
| Reranker | CrossEncoder (ms-marco-MiniLM-L-6-v2) |
Precision reranking |
| Orchestration | LangChain + LangGraph | Agent pipeline |
| Validation | Pydantic | Schema-validated outputs |
License
MIT License — see LICENSE for details.
Metadata
Release files for ella-sdk 1.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ella_sdk-1.2.5.tar.gz | 29.2 kB | Without provenance | Details for ella_sdk-1.2.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ella_sdk-1.2.5-py3-none-any.whl | Python 3 | none | any | Details for ella_sdk-1.2.5-py3-none-any.whl |
Total release size: 66.9 kB
Release files / ella_sdk-1.2.5.tar.gz
| Download URL | ella_sdk-1.2.5.tar.gz |
|---|---|
| Size | 29.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be25cf8b2753662f72ceca85b04cae5c90fbe8e4a92701c124e2f240e02a37ec
|
|
BLAKE2b-256 checksum How to use checksums |
ef0f589226b1c39a3c64aa9cc22af647b03fd46c7f591782f8e288f13264221d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / ella_sdk-1.2.5-py3-none-any.whl
| Download URL | ella_sdk-1.2.5-py3-none-any.whl |
|---|---|
| Size | 37.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
da630379b8a8f98993f2ec6856ca71fd2b17e494f33a78a1c83fed53dcf329fe
|
|
BLAKE2b-256 checksum How to use checksums |
57bede5d176b81ace648cf18552169ef5e5642ec82176e0d4901601f2992b5f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for ella-sdk 1.2.5
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.