From e02fe50fab39b5841b142c77a2dc8e7bf7d0fffb Mon Sep 17 00:00:00 2001 From: Katon Minhas Date: Fri, 7 Jun 2024 14:17:31 -0700 Subject: [PATCH] Updated Bottom Up Methodology --- src/prompts.py | 2 +- src/test.py | 27 ++++++++++++++++++++++----- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/src/prompts.py b/src/prompts.py index a013866..8c77aca 100644 --- a/src/prompts.py +++ b/src/prompts.py @@ -120,7 +120,7 @@ def BOTTOM_UP_METHODOLOGY(d): Your job is to identify what the concise methodology is based on the full methodology. Choose the closest option from the following: -Allowed Amount, Allowable Charges, Fee Schedule, Medicare Fee Schedule, Medicare Allowed Amount, Medicaid Fee Schedule, Medicaid Allowed Amount, Provider's Charges, Billed Charges, MSRP, Per Unit, Per Diem, Per Visit, Per Member, Per Member Per Month, Per Hour +Allowed Amount, Allowable Charges, Fee Schedule, Medicare Fee Schedule, Medicare Allowed Amount, Medicaid Fee Schedule, Medicaid Allowed Amount, Provider's Charges, Billed Charges, IME/DME Amount, MSRP, Per Unit, Per Diem, Per Visit, Per Member, Per Member Per Month, Per Hour For 'Allowed Amount' and 'Fee Schedule', use the more specific answer (Medicare/Medicaid) if applicable. For the 'Per ___' values, note that this list is not necessarily exhaustive. It could be anything like 'Per ___'. diff --git a/src/test.py b/src/test.py index 30586ed..463f032 100644 --- a/src/test.py +++ b/src/test.py @@ -37,6 +37,23 @@ Note that only one of REIMBURSEMENT_FLAT_FEE or REIMBURSEMENT_RATE should be pop Only return the list, with no other commentary or explanation. Ensure you abide by proper JSON formatting. """ +def BOTTOM_UP_METHODOLOGY(d): + return f"""Analyze the full methodology text listed below: +{d['FULL_METHODOLOGY']} + +Your job is to identify what the concise methodology is based on the full methodology. + +Choose the closest option from the following: +Allowed Amount, Allowable Charges, Fee Schedule, Medicare Fee Schedule, Medicare Allowed Amount, Medicaid Fee Schedule, Medicaid Allowed Amount, Provider's Charges, Billed Charges, IME/DME Amount, MSRP, Per Unit, Per Diem, Per Visit, Per Member, Per Member Per Month, Per Hour + +For 'Allowed Amount' and 'Fee Schedule', use the more specific answer (Medicare/Medicaid) if applicable. +For the 'Per ___' values, note that this list is not necessarily exhaustive. It could be anything like 'Per ___'. + +Return only the answer, without using complete sentences. If there is nothing even close to the above options in the full methodology text, simply return 'N/A' +""" + + + input_dict = utils.read_input() filename = list(input_dict.keys())[0] @@ -44,12 +61,12 @@ contract_text = input_dict[filename] print(filename) -contract_text = preprocess.clean_newlines(contract_text) -text_dict = preprocess.split_text(contract_text) -text_dict = table_funcs.align_and_format_tables({'2' : text_dict['2']}) -text_dict = preprocess.highlight_rates(text_dict) +# contract_text = preprocess.clean_newlines(contract_text) +# text_dict = preprocess.split_text(contract_text) +# text_dict = table_funcs.align_and_format_tables({'7' : text_dict['5']}) +# text_dict = preprocess.highlight_rates(text_dict) -prompt = BOTTOM_UP_PRIMARY(text_dict['2'], '') +prompt = BOTTOM_UP_METHODOLOGY({'FULL_METHODOLOGY' : 'In addition, Plan will reimburse the Provider 100% of the IME/DME amount.'}) answer = claude_funcs.invoke_claude_3(prompt, max_tokens=4000) print(answer)