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.0.tar.gz (12.0 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.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jingu_trust_gate-0.1.0.tar.gz
  • Upload date:
  • Size: 12.0 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.0.tar.gz
Algorithm Hash digest
SHA256 921ec84533b68cf8fbde978c6e7680ad508e221d6aadd55f900d24ab70b21b84
MD5 3fc747f0725943b2d3b4e5e311c83949
BLAKE2b-256 851d2239f77701064ce586a0ea3aacf4a3f073aa7d94b9b6da64dffce9ee1904

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jingu_trust_gate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9c9f24cab95394d586c98fb09af99062edf7d4018115a57d44cab9aa91ac74a
MD5 5caa29385ef9833911516cfe4468f9d8
BLAKE2b-256 534778865de7bf9730fcd6fc8a7739348c17190b1e847b98bf481dc6d67fe0ab

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