Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ jobs:
run: |
VERSION="${GITHUB_REF_NAME}" # e.g. v0.2.1
mkdir -p target/pack-tarballs
for PACK in safety-filter eu-ai-act-prohibited hipaa-triage mcp-tools-generic; do
for PACK in safety-filter eu-ai-act-prohibited medical-triage mcp-tools-generic; do
tar czf "target/pack-tarballs/pack-${PACK}-${VERSION}.tar.gz" -C packs "${PACK}"
done
- uses: actions/upload-artifact@v4
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ classification — the routing decisions your LLM keeps making run in
**In the box**

- **Studio** — web UI for namespace management, simulation, review, training. Git-backed history + rollback.
- **4 reference packs** — `safety-filter`, `hipaa-triage`, `eu-ai-act-prohibited`, `mcp-tools-generic`. Pre-calibrated thresholds + voting-gate, drop into a data dir and go.
- **4 reference packs** — `safety-filter`, `medical-triage`, `eu-ai-act-prohibited`, `mcp-tools-generic`. Pre-calibrated thresholds + voting-gate, drop into a data dir and go.
- **Library** — Python / Node / Rust, same Rust core. Embed in prod, or stay live-connected to a Studio.
- **Online learning** — Hebbian + LLM-judged corrections. No fine-tuning, no restart.
- **Native imports** — MCP, OpenAI functions, LangChain tools, OpenAPI specs.
Expand Down Expand Up @@ -63,7 +63,7 @@ Same shape in [Node](https://www.npmjs.com/package/microresolve) and
[Rust](https://docs.rs/microresolve).

Pack not what you need? Swap `safety-filter` for `mcp-tools-generic`
(tool routing), `hipaa-triage` (medical query triage), or build your own
(tool routing), `medical-triage` (medical query triage), or build your own
in the [Studio](#studio-single-binary-ui--http-server). Auto-learn from
corrections, multi-intent decomposition, live FP/recall tuning all run
in the same binary.
Expand Down Expand Up @@ -103,7 +103,7 @@ curl -L https://github.com/gladius/microresolve/releases/latest/download/microre

# Install a reference pack (see the table below for available packs)
./microresolve-studio install safety-filter
./microresolve-studio install hipaa-triage # or any of the other 4
./microresolve-studio install medical-triage # or any of the other 4

# Start the Studio (uses ~/.config/microresolve/config.toml)
./microresolve-studio
Expand Down Expand Up @@ -147,7 +147,7 @@ manually.
|---|---|---|---|---|
| **`safety-filter`** | 5 | 100 | min=3, thr=1.5 | Pre-LLM jailbreak / prompt-injection detection. **98% recall / 8% FP** on 50/50 eval. Pair with a dedicated safety classifier (LlamaGuard / Prompt-Guard) for adversarial coverage. |
| **`eu-ai-act-prohibited`** | 6 | 70 | min=2, thr=1.5 | Article 5 prohibited-practice triage. **85% top-1 / 6% FP**. Pair with lawyer review for final determination. |
| **`hipaa-triage`** | 6 | 743 | min=3, thr=1.5 | Medical query triage (clinical_urgent, clinical_routine, mental_health_crisis, administrative, billing, scheduling). **96.9% top-1 / 36.5% FP** at default; **94.8% / 21.2% at thr=2.0** for stricter precision. Triage filter, not a final decision — pair with LLM judgment or human review. **Not a HIPAA compliance solution.** |
| **`medical-triage`** (renamed from `hipaa-triage`) | 6 | 743 | min=3, thr=2.0 | Medical query triage (clinical_urgent, clinical_routine, mental_health_crisis, administrative, billing, scheduling). At thr=2.0: **F1 0.88, recall 94.5%, precision 82.9%, benign-FP 21.2%, critical-recall 97.1%**. Triage filter, not a final decision — pair with LLM judgment or human review. **Not a HIPAA compliance solution.** |
| **`mcp-tools-generic`** | 7 | 70 | min=2, thr=1.5 | Generic MCP-style tool router (web_search, send_message, fetch_url, file_operations, database_query, code_execution, calendar_management). For closed-domain tool dispatch — open-ended chat traffic produces FPs from idiomatic English. |

> Each pack ships with calibrated `default_threshold` + `default_min_voting_tokens`. Tune live in the Studio sidebar (TuningPanel) or via `PATCH /api/namespaces` for your FP/recall trade-off.
Expand All @@ -167,7 +167,7 @@ Headline numbers — full methodology, datasets, and reproduction scripts in
## Audit & compliance

Direct continuation of the v0.2.0 compliance packs
(`eu-ai-act-prohibited`, `hipaa-triage`) — those packs shipped first;
(`eu-ai-act-prohibited`, `medical-triage`) — those packs shipped first;
this is the tamper-evident chain that makes them deployable in
regulated environments.

Expand Down
10 changes: 0 additions & 10 deletions packs/hipaa-triage/_ns.json

This file was deleted.

10 changes: 10 additions & 0 deletions packs/medical-triage/_ns.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "medical-triage",
"status": "experimental",
"description": "Medical query triage: route patient inquiries to clinical_urgent / clinical_routine / mental_health_crisis / administrative / billing / scheduling. **NOT a HIPAA compliance solution** — this is a triage filter (renamed from the misleading 'hipaa-triage' in v0.2). The HIPAA audit-chain hooks still apply for the engine's tamper-evident decision log (§164.312(b)). Pre-LLM triage filter intended as a deterministic routing layer for healthcare assistant apps; pair with LLM judgment for top-1 selection.",
"default_threshold": 2.0,
"default_min_voting_tokens": 3,
"compliance_frameworks": [
"HIPAA §164.312(b)"
]
}
File renamed without changes.
2 changes: 1 addition & 1 deletion src/bin/server/audit_log.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Tamper-evident audit log — per-key hash-chained event store.
//!
//! Lineage: this module is the natural extension of the v0.2.0 compliance
//! pack work (`eu-ai-act-prohibited`, `hipaa-triage`). EU AI Act Art. 13
//! pack work (`eu-ai-act-prohibited`, `medical-triage`). EU AI Act Art. 13
//! and HIPAA §164.312(b) both require tamper-evident decision logs for
//! high-risk AI systems; this module lands the infrastructure those packs
//! need to be audit-defensible end-to-end.
Expand Down
6 changes: 3 additions & 3 deletions src/bin/server/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ pub enum Command {
/// The pack tarball is fetched from:
/// https://github.com/gladius/microresolve/releases/download/v<VERSION>/pack-<NAME>-v<VERSION>.tar.gz
///
/// Available packs: safety-filter, eu-ai-act-prohibited, hipaa-triage, mcp-tools-generic
/// Available packs: safety-filter, eu-ai-act-prohibited, medical-triage, mcp-tools-generic
Install {
/// Pack name (e.g. safety-filter, hipaa-triage, eu-ai-act-prohibited, mcp-tools-generic)
/// Pack name (e.g. safety-filter, medical-triage, eu-ai-act-prohibited, mcp-tools-generic)
pack: String,
},
/// List the 4 reference packs and show install status against the configured data dir.
Expand All @@ -111,7 +111,7 @@ pub enum Command {
/// microresolve-studio export-log --since 30d > audit-q4.jsonl
/// microresolve-studio export-log --key prod-east-python
/// microresolve-studio export-log --event-prefix intent. > rule-changes.jsonl
/// microresolve-studio export-log --namespace hipaa-triage > hipaa-decisions.jsonl
/// microresolve-studio export-log --namespace medical-triage > hipaa-decisions.jsonl
ExportLog {
/// Filter to one key's chain.
#[arg(long)]
Expand Down
4 changes: 2 additions & 2 deletions src/bin/server/packs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub fn known_packs() -> &'static [&'static str] {
&[
"safety-filter",
"eu-ai-act-prohibited",
"hipaa-triage",
"medical-triage",
"mcp-tools-generic",
]
}
Expand Down Expand Up @@ -160,7 +160,7 @@ mod tests {
packs.contains(&"eu-ai-act-prohibited"),
"missing eu-ai-act-prohibited"
);
assert!(packs.contains(&"hipaa-triage"), "missing hipaa-triage");
assert!(packs.contains(&"medical-triage"), "missing medical-triage");
assert!(
packs.contains(&"mcp-tools-generic"),
"missing mcp-tools-generic"
Expand Down
Loading