Skip to main content

RedCheck Logo

PyPI Version License

RedCheck 🔍

Lightweight evaluation engine for LLM outputs and hallucination detection.


💾 Installation

pip install redcheck

⚡ Quickstart

1. Local Evaluation (Offline & Free)

*No API keys required/Users/nikki/redcheck RedCheck evaluates text directly on your machine.

from redcheck import RedCheck

evaluator = RedCheck()

context = "The product was released in 2024 and includes free support."
response = "The product was released in 1990 without support."

result = evaluator.evaluate_hallucination(context=context, response=response)

print(f"Status: {result['status']}")
print(f"Reason: {result['reason']}")

2. Using Cloud LLMs (Optional)

If you want to leverage external models like OpenAI or Anthropic for complex semantic reasoning, simply pass your API key:

from redcheck import RedCheck

evaluator = RedCheck(provider="openai", api_key="your-openai-api-key")

result = evaluator.evaluate_hallucination(
    context="Python 3.12 introduces improved error messages.",
    response="Python 3.12 has worse error messages."
)

print(result)

Note: If your Cloud API key runs out of quota (Error 429), RedCheck automatically switches to the Smart Local Engine to prevent pipeline crashes.


⚙️ How the Local Engine Works

RedCheck's local engine uses a multi-stage validation rule set:

Feature Description Example
Numeric & Date Check Extracts and verifies numbers/years between context and response. 2020 vs 2024FAIL
Polarity & Negation Scans for polarity flippers (not, never, no, without). "is active" vs "is not active"FAIL
Text Similarity Computes baseline lexical alignment. Low overlap ➔ FAIL

🛣️ Roadmap & SaaS Version

We are actively developing RedCheck SaaS Premium:

  • 📊 Real-time Dashboard: Monitor hallucinations, latency, and token costs.
  • 🗝️ Centralized Key & Token Management: Manage usage across teams.
  • 📈 Historical Metrics & Analytics: Track model performance over time.

📄 License

RedCheck is open-source software licensed under the MIT License.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redcheck-0.6.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

redcheck-0.6.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file redcheck-0.6.0.tar.gz.

File metadata

  • Download URL: redcheck-0.6.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for redcheck-0.6.0.tar.gz
Algorithm Hash digest
SHA256 6e36877fb3aa9d00079b1e8a07024ce755474fe30c6700a9d194375c8044bdbf
MD5 81ca3034296577f35928735a76bc74e8
BLAKE2b-256 728f3911bb04242c97f6a11f812d0647c3b3856a576a69cd7b9d9d3ee7678fac

See more details on using hashes here.

File details

Details for the file redcheck-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: redcheck-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for redcheck-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df33bc832805ff6fe4b3c910a6dfc923106e5c48cf59b10316fc81c0567e1fb2
MD5 a6e576e0533102bfa550dd9baeaf3e74
BLAKE2b-256 1258d413d74b12ecdef2f94b9bc9acd0db5e72e460ad96fecb8d849d2f503fe5

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 Sentry Error logging StatusPage Status page