Sovereign 8s.is mirror of standardgalactic/hcms
  • Jupyter Notebook 79.6%
  • Python 20%
  • Shell 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
alidasmeh 1425fc51c2
Some checks failed
Deployment / Build Image (watcher) (push) Has been cancelled
Deployment / Deploy Service (watcher) (push) Has been cancelled
Deployment / Deployment Summary (push) Has been cancelled
Functional testing / pytest (push) Has been cancelled
Lint / Lint (push) Has been cancelled
debug rate_conversation
2026-08-04 11:57:36 +02:00
.codex/environments BAN-837: Rename hpms to hcms 2026-07-22 10:20:30 +02:00
.github BAN-837: Rename hpms to hcms 2026-07-22 10:20:30 +02:00
.vscode Initial commit 2025-08-31 18:46:21 +02:00
data Delete data/paper directory 2026-07-22 20:43:14 +02:00
docs Remove internal issue tracker references 2026-07-23 11:20:48 +02:00
hcms debug rate_conversation 2026-08-04 11:57:36 +02:00
kubernetes/worker-service BAN-102 BAN-103: Add watcher deployment 2026-03-06 15:24:47 +01:00
notebooks BAN-837: Rename hpms to hcms 2026-07-22 10:20:30 +02:00
script BAN-837: Rename hpms to hcms 2026-07-22 10:20:30 +02:00
tests BAN-837: Rename hpms to hcms 2026-07-22 10:20:30 +02:00
.dockerignore Docker: Ignore virtualenv directory 2026-03-11 19:26:57 +01:00
.editorconfig Initial commit 2025-08-31 18:46:21 +02:00
.flake8 Initial commit 2025-08-31 18:46:21 +02:00
.gitignore feat: Update app naming format and add .claude/worktrees to gitignore 2026-04-01 15:25:17 +02:00
.jscpd.json Initial commit 2025-08-31 18:46:21 +02:00
.markdownlint.yml Initial commit 2025-08-31 18:46:21 +02:00
.mypy.ini Initial commit 2025-08-31 18:46:21 +02:00
.pre-commit-config.yaml Lint: Update versions 2026-03-10 00:23:48 +01:00
.prettierignore Initial commit 2025-08-31 18:46:21 +02:00
.prettierrc.yml Initial commit 2025-08-31 18:46:21 +02:00
.pylintrc Initial commit 2025-08-31 18:46:21 +02:00
AGENTS.md BAN-837: Rename hpms to hcms 2026-07-22 10:20:30 +02:00
compose.lint.yml Compose: Rename file extension of compose.lint.yaml 2026-03-11 11:44:36 +01:00
compose.yml BAN-837: Rename hpms to hcms 2026-07-22 10:20:30 +02:00
contributing.md Initial commit 2025-08-31 18:46:21 +02:00
Dockerfile BAN-837: Rename hpms to hcms 2026-07-22 10:20:30 +02:00
env.example BAN-837: Rename hpms to hcms 2026-07-22 10:20:30 +02:00
evaluate_dataset.py BAN-837: Rename hpms to hcms 2026-07-22 10:20:30 +02:00
generate_dataset.py BAN-837: Rename hpms to hcms 2026-07-22 10:20:30 +02:00
license License: Use CC-BY-NC 4.0 2026-07-23 13:09:17 +02:00
poetry.lock Docker: Optimize Compose build 2026-03-11 19:16:49 +01:00
poetry.toml Initial commit 2025-08-31 18:46:21 +02:00
pyproject.toml BAN-837: Rename hpms to hcms 2026-07-22 10:20:30 +02:00
readme.md Remove internal issue tracker references 2026-07-23 11:20:48 +02:00
upload_to_gdrive.py BAN-837: Rename hpms to hcms 2026-07-22 10:20:30 +02:00
utils.sh Initial commit 2025-08-31 18:46:21 +02:00

HCMS

Hybrid Clinician-in-the-Loop Monitoring System (HCMS) for safety monitoring and evaluation of LLM conversational agents.

Requirements

Installation

  • Bootstrap local environment:

    ./script/bootstrap
    
  • Install package dependencies:

    ./script/install
    

Usage

Paper dataset generation and evaluation instructions are documented in:

Lint and tests

  • Run linters:

    ./script/lint
    
  • Run tests (excluding regression):

    ./script/test
    
  • Run full tests (including regression):

    ./script/test -r
    

Local monitoring stack

Use these lifecycle scripts for local MongoDB + watcher:

  • Build stack:

    ./script/build
    
  • Start stack:

    ./script/start
    
  • Stop stack (keep data):

    ./script/stop
    
  • Destroy stack (remove containers + volumes):

    ./script/destroy
    

Watcher runtime behavior:

  • Startup backfill retries transient provider failures (default 10 retries, 2s between no-progress retries).
  • Change stream reconnect uses exponential backoff with jitter (default 1s base, 30s max, 0.25s jitter).
  • Logging level defaults to INFO and can be tuned with HCMS_LOG_LEVEL.

Main tuning variables (set in .env):

  • MONGODB_CHANGE_STREAM_MAX_AWAIT_MS
  • MONGODB_BACKFILL_BATCH_SIZE
  • MONGODB_BACKFILL_MAX_RETRIES
  • MONGODB_BACKFILL_RETRY_SLEEP_SECONDS
  • MONGODB_RECONNECT_BACKOFF_BASE_SECONDS
  • MONGODB_RECONNECT_BACKOFF_MAX_SECONDS
  • MONGODB_RECONNECT_BACKOFF_JITTER_SECONDS
  • HCMS_LOG_LEVEL

Connect to local MongoDB from host tools (MongoDB Compass, mongosh, app clients):

mongodb://mongo:27017/?replicaSet=rs0

Note: the local replica set member is advertised as mongo:27017 inside Docker. From the host machine, use directConnection=true to avoid hostname resolution errors for mongo.

Documentation

License

CC-BY-4.0