rules.md

August 4, 2026 ยท View on GitHub

The specific rules for each quality metric are as follows:

Function NameTypeDescriptionReference
RuleAbnormalCharEFFECTIVENESSCheck whether content contains abnormal characters.
RuleAbnormalHtmlEFFECTIVENESSCheck whether content contains abnormal HTML.
RuleAbnormalNumberFLUENCYCheck PDF content for abnormal page or index numbers.
RuleAgentTraceLatencyAnomalyAGENT_TRACE_QUALITYDetect abnormally slow agent steps using statistical outlier analysis.
RuleAgentTraceLoopDetectionAGENT_TRACE_QUALITYDetect repetitive tool-call patterns that indicate loops.
RuleAgentTraceTokenBudgetAGENT_TRACE_QUALITYCheck whether agent token usage exceeds the configured budget.
RuleAlphaWordsEFFECTIVENESScheck whether the ratio of words that contain at least one alphabetic character > 0.6Redpajama MAP-en Gopher Dolma
RuleAudioDataFormatEFFECTIVENESSCheck whether audio data has the expected format.
RuleAudioDurationEFFECTIVENESSCheck whether audio duration meets the configured standard.
RuleAudioSnrQualityEFFECTIVENESSCheck whether the audio signal-to-noise ratio meets the configured standard.
RuleAuthorFieldValidationEFFECTIVENESSValidate scientific metadata author fields.
RuleCapitalWordsUNDERSTANDABILITYcheck whether capital words ratio > 0.2Redpajama MAP-en
RuleCharNumberEFFECTIVENESScheck whether the number of char > 100MAP-en
RuleCharSplitFLUENCYCheck PDF content for abnormally split characters.
RuleColonEndCOMPLETENESScheck whether the last char is ':'
RuleContentNullEFFECTIVENESScheck whether content is null
RuleContentShortEFFECTIVENESSCheck whether content is too short.
RuleContentShortMultiLanEFFECTIVENESSCheck whether multilingual content is too short.
RuleCurlyBracketUNDERSTANDABILITYcheck whether the ratio of the number of {,} and the number of characters < 0.025Redpajama C4
RuleDictConsistencyEFFECTIVENESSCompare two dictionary fields and report mismatched keys.
RuleDocFormulaRepeatSIMILARITYCheck whether formulas repeat in a document.
RuleDocRepeatSIMILARITYcheck whether content repeatsRedpajama MAP-en FineWeb Gopher
RuleDoiEFFECTIVENESSValidate DOI metadata.
RuleEnterAndSpaceEFFECTIVENESSCheck abnormal combinations of line breaks and spaces.
RuleEnterMoreEFFECTIVENESSCheck whether content has excessive consecutive line breaks.
RuleEnterRatioMoreEFFECTIVENESSCheck whether the line-break ratio is excessive.
RuleHallucinationHHEMHALLUCINATIONDetect ungrounded claims with MiniCheck-Flan-T5-Large (checks whether the response is supported by the context).
RuleHeadWordArRELEVANCECheck Arabic content for irrelevant source information.
RuleHeadWordCsRELEVANCECheck Czech content for irrelevant source information.
RuleHeadWordHuRELEVANCECheck Hungarian content for irrelevant source information.
RuleHeadWordKoRELEVANCECheck Korean content for irrelevant source information.
RuleHeadWordRuRELEVANCECheck Russian content for irrelevant source information.
RuleHeadWordSrRELEVANCECheck Serbian content for irrelevant source information.
RuleHeadWordThRELEVANCECheck Thai content for irrelevant source information.
RuleHeadWordViRELEVANCECheck Vietnamese content for irrelevant source information.
RuleHtmlEntityRELEVANCEcheck whether content has html entity
RuleHtmlTagEFFECTIVENESSCheck whether content contains image links or HTML tags.
RuleIDCardSECURITYcheck if the content contains ID card.
RuleImageArtimuseIMG_ARTIMUSEDetect inappropriate artificial-image usage.
RuleImageDataFormatEFFECTIVENESSCheck whether image data has the expected format.
RuleImageLabelOverlapIMG_LABEL_OVERLAPCheck whether image labels overlap.
RuleImageLabelVisualizationIMG_LABEL_VISUALIZATIONVisualize and validate image labels.
RuleImageQualityIMG_EFFECTIVENESSCheck whether image quality meets the configured standard.
RuleImageRepeatIMG_SIMILARITYDetect duplicate images using perceptual hash or CNN features.
RuleImageSizeValidIMG_EFFECTIVENESSCheck whether image dimensions and aspect ratio are valid.
RuleImageTextSimilarityIMG_RELEVANCECheck similarity between an image and its text content.
RuleImageValidIMG_EFFECTIVENESSCheck whether an image is valid and not uniformly white or black.
RuleInvisibleCharEFFECTIVENESSCheck whether content contains invisible characters.
RuleIsbnEFFECTIVENESSValidate ISBN metadata.
RuleLatexSpecialCharEFFECTIVENESSCheck PDF content for abnormal LaTeX characters.
RuleLineEndWithEllipsisCOMPLETENESScheck whether the ratio of line ends with ellipsis < 0.3Redpajama MAP-en Gopher Dolma
RuleLineEndWithTerminalCOMPLETENESScheck whether the ratio of line ends with terminal punctuation mark > 0.6Redpajama FineWeb C4
RuleLineJavascriptCountEFFECTIVENESScheck whether line with the word Javascript.Redpajama FineWeb C4
RuleLineStartWithBulletpointUNDERSTANDABILITYcheck whether the ratio of line starts with bullet points < 0.9Redpajama MAP-en Gopher Dolma
RuleLoremIpsumEFFECTIVENESScheck whether the ratio of lorem ipsum < 3e-08Redpajama MAP-en FineWeb C4
RuleMeanWordLengthEFFECTIVENESScheck whether the mean length of word in [3, 10]Redpajama MAP-en Gopher Dolma
RuleMetadataSimilarityEFFECTIVENESSCompare the similarity of scientific metadata fields.
RuleNlpDataFormatEFFECTIVENESSCheck whether NLP data has the expected format.
RuleNoPuncFLUENCYcheck whether paragraph has no punctuation.
RuleOnlyUrlEFFECTIVENESSCheck whether content consists only of a URL.
RulePatternSearchRELEVANCESearch content using a user-provided pattern.
RulePIIDetectionSECURITYDetect personally identifiable information in text.
RuleQuanliangFieldValidationEFFECTIVENESSValidate full-volume scientific metadata fields.
RuleResumeDateFormatRESUME_DATECheck whether a resume uses inconsistent date formats.
RuleResumeDetailedAddressRESUME_PRIVACYCheck whether a resume contains a detailed address.
RuleResumeEducationMissingRESUME_COMPLETENESSCheck whether a resume is missing its education section.
RuleResumeEmailMissingRESUME_CONTACTCheck whether a resume is missing an email address.
RuleResumeEmojiRESUME_PROFESSIONALISMCheck whether a resume contains emoji.
RuleResumeExcessiveWhitespaceRESUME_FORMATCheck whether a resume contains excessive whitespace.
RuleResumeExperienceMissingRESUME_COMPLETENESSCheck whether a resume is missing work experience.
RuleResumeIDCardRESUME_PRIVACYCheck whether a resume contains a Chinese ID card number.
RuleResumeInformalRESUME_PROFESSIONALISMCheck whether a resume contains informal language.
RuleResumeMarkdownRESUME_FORMATCheck whether a resume contains Markdown syntax errors.
RuleResumeNameMissingRESUME_STRUCTURECheck whether a resume is missing a name in its first section.
RuleResumePhoneFormatRESUME_CONTACTCheck whether a phone number has an invalid format.
RuleResumePhoneMissingRESUME_CONTACTCheck whether a resume is missing a phone number.
RuleResumeSectionMissingRESUME_STRUCTURECheck whether a resume is missing required sections.
RuleSentenceNumberCOMPLETENESScheck whether the number of sentence in [3, 7500]Redpajama MAP-en FineWeb C4
RuleSftDataFormatEFFECTIVENESSCheck whether supervised fine-tuning data has the expected format.
RuleSourceFieldValidationEFFECTIVENESSValidate scientific metadata source fields.
RuleSpaceMoreEFFECTIVENESSCheck whether content contains excessive spaces.
RuleSpecialCharacterRELEVANCEcheck whether content has special characters.
RuleStopWordEFFECTIVENESScheck whether the ratio of stop word > 0.06Redpajama MAP-en Gopher Dolma
RuleSymbolWordRatioEFFECTIVENESScheck whether the ratio of symbol / word is > 0.4Redpajama Gopher Dolma
RuleUniqueWordsUNDERSTANDABILITYcheck whether the ratio of unique words > 0.1Redpajama MAP-en
RuleUnsafeWordsSECURITYCheck whether content contains unsafe words.
RuleVedioDataFormatEFFECTIVENESSCheck whether video data has the expected format.
RuleWatermarkRELEVANCEcheck whether content has watermarks.
RuleWordNumberEFFECTIVENESScheck whether the number of word in [20, 100000]Redpajama MAP-en Gopher Dolma
RuleWordSplitFLUENCYCheck PDF content for abnormally split words.
RuleWordStuckFLUENCYCheck whether words are abnormally joined together.