Skip to main content

A deterministic trust gate for LLM systems

Project description

jingu-trust-gate

LLM output is untrusted input. jingu-trust-gate decides what is allowed to become trusted system state.

Python SDK for jingu-trust-gate — deterministic admission control layer for LLM systems.

Install

pip install jingu-trust-gate

Quick start

from jingu_trust_gate import create_harness, HarnessPolicy, Proposal, SupportRef

class MyPolicy(HarnessPolicy[MyClaim]):
    def validate_structure(self, proposal): ...
    def bind_support(self, unit, pool): ...
    def evaluate_unit(self, unit_with_support, ctx): ...
    def detect_conflicts(self, units, pool): ...
    def render(self, admitted_units, pool, ctx): ...
    def build_retry_feedback(self, unit_results, ctx): ...

harness = create_harness(policy=MyPolicy())
result = await harness.admit(proposal, support_pool)
context = harness.render(result)

See examples/medical_symptom_policy.py for a complete working example.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jingu_trust_gate-0.1.1.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jingu_trust_gate-0.1.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file jingu_trust_gate-0.1.1.tar.gz.

File metadata

  • Download URL: jingu_trust_gate-0.1.1.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.4

File hashes

Hashes for jingu_trust_gate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8414ee0ac6f08b24e6ec639d7d9dd1c06cfd51711c34bfafecb2c38bda76c7a2
MD5 cc56723f216fd15492ad423e10688a03
BLAKE2b-256 b78a7a7a2ec26c33f9798ac84e564b577a3761f7747d24dfceca21be34b719e7

See more details on using hashes here.

File details

Details for the file jingu_trust_gate-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for jingu_trust_gate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ac34a04d5a810f8bcb6a4106dc3dbdfd922eac748a65a23babaeac1e1ae75a29
MD5 06238f691ff70f9c33decd7599a3e32f
BLAKE2b-256 51b0141a64a1054a3772cefef495bb7a81add6744530622f264806370e4a3bfb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page