Skip to content

docs(biome): document curated knowledge workflow - #45

Merged
iihimanshuu merged 1 commit into
hiperhealth:mainfrom
iihimanshuu:docs/curated-backend-workflow
Aug 23, 2026
Merged

iihimanshuu merged 1 commit into
hiperhealth:mainfrom
iihimanshuu:docs/curated-backend-workflow

Conversation

@iihimanshuu

Copy link
Copy Markdown
Collaborator

Pull Request description

Document the complete curated-knowledge backend workflow using public APIs and
obviously fictional data.

This documentation-only PR:

  • adds a copy-pasteable standalone backend example;
  • creates fictional ScientificReference objects;
  • creates fictional CuratedKnowledgeRecord objects;
  • constructs and validates a KnowledgeCollection;
  • saves deterministic UTF-8 JSON to a temporary directory;
  • loads and reconstructs the collection;
  • confirms the persistence round trip remains equivalent;
  • executes deterministic lexical retrieval;
  • applies an explicit fictional review-status allowlist;
  • applies a deterministic result limit;
  • displays retrieved record IDs and relevance scores;
  • displays resolved scientific-reference identifiers and canonical URLs;
  • generates structured and human-readable traceable context;
  • explains expected filtering, scoring, and reference ordering;
  • explains that review statuses are caller-defined and matched exactly;
  • documents the boundary between hphbiome and
    hphbiome-hiperhealth;
  • documents explicit HiperHealth query parameters and the final stage-result
    location;
  • states that the adapter never derives queries from patient context;
  • states the project’s safety and professional-judgment limitations.

The standalone example requires only the hphbiome package and Python’s
standard library. HiperHealth is not required.

No production behavior, tests, manifests, dependencies, or root documentation
are changed.

Closes #25

How to test these changes

Run the Python example under the “Curated-knowledge backend workflow” section of:

packages/hphbiome/README.md

The expected behavior is:

  • only fictional-record-visible is returned;
  • its relevance score is 1.0;
  • fictional-record-hidden is excluded by the status allowlist;
  • beta provenance appears before alpha provenance;
  • both reference identifiers and canonical URLs appear;
  • structured and text context preserve the record and reference provenance.

Run the complete test suite:

py -3.13 -m pytest --cov=hphbiome --cov=hphbiome_hiperhealth --cov-fail-under=92 --cov-report term-missing --no-cov-on-fail -p no:xonsh -q

Run Ruff:

py -3.13 -m ruff check packages tests

Verify formatting:

py -3.13 -m ruff format --check packages tests

Run mypy:

py -3.13 -m mypy packages/hphbiome/src packages/hphbiome-hiperhealth/src

Run pre-commit:

py -3.13 -m pre_commit run --files packages/hphbiome/README.md packages/hphbiome-hiperhealth/README.md --verbose

Pull Request checklists

This PR is a:

  • bug-fix
  • new feature
  • maintenance

About this PR:

  • it includes tests.
  • the tests are executed on CI.
  • the tests generate log file(s) (path).
  • pre-commit hooks were executed locally.
  • this PR requires a project documentation update.

Author's checklist:

Additional information

The full suite passes with 279 tests and 99.85% coverage.

All example records, review statuses, bibliographic metadata, identifiers,
canonical URLs, queries, and syntheses are fictional.

The documentation explicitly states that HPH Biome does not diagnose, recommend
treatment, validate scientific or medical claims, or replace professional
judgment. It also states that callers remain responsible for privacy, licensing,
content quality, and review status.

## Reviewer's Checklist

- [ ] I managed to reproduce the problem locally from the `main` branch
- [ ] I managed to test the new changes locally
- [ ] I confirm that the issues mentioned were fixed/resolved

@iihimanshuu iihimanshuu self-assigned this Aug 23, 2026
@iihimanshuu
iihimanshuu merged commit 1f951a6 into hiperhealth:main Aug 23, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document the complete curated-knowledge backend workflow

1 participant