Skip to content

Text Quality

Our Text Quality Detector is designed to evaluate the quality of text outputs and ensure they meet specific criteria. By leveraging advanced algorithms, this tool helps maintain high-quality content and user interactions within your applications.

Vulnerability

Poor-quality text, including grammatical errors, offensive language, or incoherent content, can degrade user experience and credibility.

Usage

This detector evaluates text quality based on readability metrics such as Automated Readability Index, Dale Chall Readability Score, Linsear Write Formula, Gunning Fog Index, and Aggregate Reading Level.

Configuration

from guardrail.firewall.output_detectors import TextQualityOutput

firewall = Firewall()
output_detectors = [TextQualityOutput()]

sanitized_response, valid_results, risk_score = firewall.scan_output(sanitized_prompt, response_text, output_detectors)