compass.validation.utilities.step_based_threshold#

step_based_threshold(num_chunks)[source]#

Generate a threshold based on number of chunks

Parameters:

num_chunks (int) – Number of chunks being considered in the validation. This is used to determine how strict the validation should be, with more chunks generally requiring a higher fraction of chunks to pass for the document to be considered valid (but never no more than 80%).

Returns:

float – Threshold value between 0.5 and 0.8, where higher values indicate a stricter requirement for the fraction of chunks that must pass the validation.