Skip to main content

Detects and removes hallucinations from LLM-generated text using an NLI model to validate it against a provided context.

Project description

guardrails-ai-provenance-nli

Detects and removes hallucinations from LLM-generated text using an NLI model to validate it against a provided context.

Installation

pip install guardrails-ai-provenance-nli

This validator ships local models. After installing, run the post-install step to download them:

python -m guardrails_ai.provenance_nli.post_install

Usage

from guardrails import Guard
from guardrails_ai.provenance_nli import ProvenanceNLI

guard = Guard().use(ProvenanceNLI)

License

MIT — © Guardrails AI.

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

guardrails_ai_provenance_nli-0.1.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

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

guardrails_ai_provenance_nli-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for guardrails_ai_provenance_nli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 234a56b5e10c20fb9a69211dabd31c679c70ce90ba52c5e0a70ac38bc74e620c
MD5 205d694fd5face7cd79a31880c62384d
BLAKE2b-256 15b68befa0f280070524fb2f34a1d4b597bba97743470743b2500aee3fff2a2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for guardrails_ai_provenance_nli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5596ea87bc0f3f784d50b2f4be0afba805d93bf27bd5ecfe5a01fc4238e1187f
MD5 49beed815828205f3e8356df362d8690
BLAKE2b-256 391cc64c9d7c95899409c418f2828d6c6d0086fd1fb44f7027b0bac2f951ea88

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