diff --git a/src/pipelines/clients/bcbs_promise/prompts/prompt_calls.py b/src/pipelines/clients/bcbs_promise/prompts/prompt_calls.py index 9ebeaa8..41f636d 100644 --- a/src/pipelines/clients/bcbs_promise/prompts/prompt_calls.py +++ b/src/pipelines/clients/bcbs_promise/prompts/prompt_calls.py @@ -50,4 +50,4 @@ def validate_reimbursements_for_llm(answer_dict: dict[str, str], filename: str) f"LLM response for reimbursement validation in {filename}:\n{llm_response}" ) final_answer = _parser(llm_response) - return final_answer == "YES" + return "YES" in final_answer diff --git a/src/pipelines/clients/clover/prompts/prompt_calls.py b/src/pipelines/clients/clover/prompts/prompt_calls.py index 77a7f3c..5813b4a 100644 --- a/src/pipelines/clients/clover/prompts/prompt_calls.py +++ b/src/pipelines/clients/clover/prompts/prompt_calls.py @@ -49,5 +49,5 @@ def validate_reimbursements_for_llm(answer_dict: dict[str, str], filename: str) logging.debug( f"LLM response for reimbursement validation in {filename}:\n{llm_response}" ) - final_answer = _parser(llm_response).strip().upper() - return final_answer == "YES" + final_answer = _parser(llm_response) + return "YES" in final_answer