Skip to content

Maybe a bug in promptwizard/glue/promptopt/techniques/critique_n_refine/core_logic.py #36

@JaniGovanni

Description

@JaniGovanni

The following code (evaluate method in core_logic.py) seems suspicious:

answer_matches = re.findall(DatasetSpecificProcessing.ANSWER_DELIMITER_PATTERN, generated_text)
 
# answer_matches = [self.chat_completion(FINAL_ANSWER_EXTRACTION_PROMPT.format(text=generated_text), "You are an AI assistant. Please follow the users requests.")]
answer_matches = [generated_text]
# 
answers_len, dataset_len = len(answer_matches), len(dataset_subset)

Since generated_text is a string, len(answer_matches) will always be 1. I don't think this is intended. Also, answer_matches seems to be redundantly defined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions