Skip to content

Conversation

@googlercolin
Copy link

In the should_early_exit function, the final return should be False because the conditions are not met.

    # Number of answers should be greater than the threshold
    if len(answers) < continue_certain_bar:
        return False  # Early exit condition NOT met

    # The probe response text should not contain any uncertain words
    probe_response_text_lower = probe_response_text.lower()
    if any(word in probe_response_text_lower for word in uncertain_words):
        return False  # Early exit condition NOT met

    # The last answer window should be consistent
    answer_candidates = answers[-continue_certain_bar:]
    is_certains = is_certains[-continue_certain_bar:]
    if eqaul_group(answer_candidates):
        if count_not_empty(answer_candidates) == continue_certain_bar:
            if sum(is_certains) == continue_certain_bar:
                # logger.debug(f"Early exit on: {answer_candidates = } ({is_certains = })")
                return True  # Early exit condition MET!

    return True  # BUG: This should likely be False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant