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

Uploaded Python 3

File details

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

File metadata

  • Download URL: jingu_trust_gate-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 09fb45da7ff188d8cf50485ec4aad460aafc583d71e0bb46bd10ffdf1ee31f73
MD5 bfba2c25af19a9b02f0a22ebb89b58aa
BLAKE2b-256 0134687b6d7913a6bdfa07dc02ebdb2087c136c8cbb69ac41deede2ed5252c87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jingu_trust_gate-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9af5b17693e2397053bbe43219bcf8bb29b5e1de9964d21956520156211a5f66
MD5 7dd322daf26843866ed97781f599ca9a
BLAKE2b-256 01656450ccb53048789693035e9234703cb5dde58ca1d5df85dbb3d9f1075fbd

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