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.4.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.4-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jingu_trust_gate-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 54e65deace9d0fcf7751ebe8685ef84fcc917f63aa15ca2dfa043530de42ba53
MD5 c5022124bf2fa86a7e12b678032e57f2
BLAKE2b-256 d5dacada75cc043bd21df443d8c39f394c3b85b7b1bb1d65a13732ad1493a654

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jingu_trust_gate-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 35d204b2be896cccde8e588847f3cc85cba66263f2c1f54b7035ca2847127ebe
MD5 da4e0ffb4bcef1497a1bb6373fae9225
BLAKE2b-256 7f71d22f05e10577ff5c5c993e365b8a43e12655fbda792e0d8b769ab20b665c

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