From 4f363156e7a799a852c57fb575171a7cf7b1ae1f Mon Sep 17 00:00:00 2001 From: Alex Galarce Date: Fri, 14 Feb 2025 14:48:57 +0000 Subject: [PATCH] Merged in feature/new-prompts-for-methodology (pull request #395) Feature/new prompts for methodology * Added reimb. effective date and termination date * Added prompt for identifying 'not to exceed' limitations in investment prompts * Refactor field names for reimbursement effective and termination dates in investment prompts * Clarified documentation for handling multiple reimbursement methods in investment prompts Approved-by: Katon Minhas --- .../src/prompts/investment_prompts.json | 18 ++++++++++++++++++ .../src/prompts/investment_prompts.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/fieldExtraction/src/prompts/investment_prompts.json b/fieldExtraction/src/prompts/investment_prompts.json index 231b083..2779c2f 100644 --- a/fieldExtraction/src/prompts/investment_prompts.json +++ b/fieldExtraction/src/prompts/investment_prompts.json @@ -42,6 +42,24 @@ "field_type": "methodology_breakout", "prompt": "If the reimbursement rate is a percentage of something, what is that percentage? Note that 100% may be implied." }, + { + "field_name": "REIMBURSEMENT_EFFECTIVE_DATE", + "relationship": "one_to_n", + "field_type": "dynamic", + "prompt": "Identify the effective date for reimbursement rates:\n- Look for dates associated with:\n • 'Effective' or 'effective date'\n • 'In effect' or 'in effect on'\n • Date ranges with 'from/through' or 'start/end'\n- Dates may appear as:\n • Full dates (12/1/17, December 1, 2017)\n • Month and year (December 2017)\n • Year only (2017)" + }, + { + "field_name": "REIMBURSEMENT_TERMINATION_DATE", + "relationship": "one_to_n", + "field_type": "dynamic", + "prompt": "Identify the termination date for reimbursement rates:\n- Look for dates associated with:\n • 'Termination' or 'termination date'\n • 'Expires' or 'expiration date'\n • 'Through' or 'until'\n- Dates may appear as:\n • Full dates (12/1/17, December 1, 2017)\n • Month and year (December 2017)\n • Year only (2017)" + }, + { + "field_name": "NOT_TO_EXCEED_IND", + "relationship": "one_to_n", + "field_type": "methodology_breakout", + "prompt": "Identify if there is a 'not to exceed' limitation:\n- Look for phrases like:\n • 'not to exceed' or 'NTE'\n • 'shall not exceed'\n • 'maximum of' or 'max'\n- These may apply to:\n • Dollar amounts\n • Percentages\n • Per-service limits\nReturn 'Y' if any such limitation is found, 'N' if not." + }, { "field_name": "CONTRACT_FEE_SCHEDULE_DESC", "relationship": "one_to_n", diff --git a/fieldExtraction/src/prompts/investment_prompts.py b/fieldExtraction/src/prompts/investment_prompts.py index 9f3f2ac..914cd00 100644 --- a/fieldExtraction/src/prompts/investment_prompts.py +++ b/fieldExtraction/src/prompts/investment_prompts.py @@ -320,7 +320,7 @@ Populate a list of JSON dictionaries with the following fields: {questions} In some cases, there will only be one reimbursement method listed. In these cases, the list should only contain a single JSON dictionary with all fields present. -In other cases, there will be multiple reimbursement methods listed. This is particularly common in the presence of 'lesser of' language. In these cases, the list should contain a list of JSON dictionaries with all fields present for each individual methodology seen. +In other cases, there will be multiple reimbursement methods listed. This is particularly common in the presence of 'lesser of' language. In these cases, the list should contain a list of JSON dictionaries with all fields present for each individual methodology seen. This may be two or more dictionaries in a single list, especially when there is both 'lesser of' as well as 'not to exceed' language present. Here is the text to analyze and respond to: {methodology}