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_trust_gate, GatePolicy, Proposal, SupportRef

class MyPolicy(GatePolicy[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): ...

gate = create_trust_gate(policy=MyPolicy())
result = await gate.admit(proposal, support_pool)
context = gate.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.3.tar.gz (23.5 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.3-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jingu_trust_gate-0.1.3.tar.gz
  • Upload date:
  • Size: 23.5 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.3.tar.gz
Algorithm Hash digest
SHA256 73037dae235bfb6647e387d8c8d9559a9b1262b36b0dc788878049275622d67f
MD5 091bd1bb80b8053c2d860ef04983d8e0
BLAKE2b-256 4c9e6c87c5d70128ebb21e19f57e9dec905ee346dc53b5cfadec79651e924cda

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jingu_trust_gate-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 230cac2837e743d72b6f151c86b9e721843792d50bdff85ba4e0f4e86887c203
MD5 74ce067f2839a615a7bfa065fe29a830
BLAKE2b-256 b71167e54a379019275dd1b181fd2bd2249aacf567f977f5d83fee506ccaecc6

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