Merge branch 'main' into DEV
This commit is contained in:
@@ -195,8 +195,8 @@
|
||||
"field_name": "CONTRACT_AMENDMENT_NUM",
|
||||
"relationship": "one_to_one",
|
||||
"field_type": "smart_chunked",
|
||||
"prompt": "Extract the amendment number if this document is an amendment to a contract. Follow these guidelines:\n1. Look for phrases like 'Amendment No. X', 'X Amendment', 'Amendment X to the Agreement', 'Xth Amendment' in the document title, preamble, or header sections.\n2. Return only the numeric value (e.g., for 'Amendment No. 3' return '3').\n3. If the amendment number is written as a word (e.g., 'First Amendment'), convert it to a number (e.g., '1').\n4. If the amendment number is an alphanumeric value, return the whole value (e.g., for '2A' return '2A').\n5. If the amendment number uses Roman numerals (e.g., 'Amendment IV'), convert it to a number (e.g., '4').\n6. If the amendment number includes decimal points (e.g., 'Amendment 2.1'), return the full numeric value (e.g., '2.1').\n7. If multiple amendment numbers appear, return the one most clearly associated with the current document.\n8. If the document is an amendment but the number cannot be determined, return 'UNKNOWN'.\n9. If the document is not an amendment, return 'N/A'.\n10. If the Amendment number contains any leading zeroes(e.g. '001'), Drop all leading zeros (e.g. '1').",
|
||||
"retrieval_question": "What is the amendment number of this document? Amendment No., Amendment Number, ordinal amendment, numbered amendment? Amendment to agreement, amendment to contract."
|
||||
"prompt": "Extract the amendment number or identifier if this document is an amendment to a contract. The amendment identifier can be numeric, letters only, or alphanumeric. Follow these guidelines:\n1. Look for phrases like 'Amendment No. X', 'X Amendment', 'Amendment X to the Agreement', 'Xth Amendment' in the document title, preamble, or header sections.\n2. Return the amendment number/identifier exactly as it appears, only if it consists of numbers, letters, or alphanumeric characters. (e.g., for 'Amendment No. 3' return '3', for 'Amendment A' return 'A', for 'Amendment 3A' return '3A').\n3. If the amendment number is written as a word (e.g., 'First Amendment'), convert it to a number (e.g., '1').\n4. If the amendment identifier is alphanumeric, return the whole value (e.g., for '2A' return '2A').\n5. If the amendment number uses Roman numerals (e.g., 'Amendment IV'), convert it to a number (e.g., '4').\n6. If the amendment number includes decimal points (e.g., 'Amendment 2.1'), return the full numeric value (e.g., '2.1').\n7. If the amendment identifier is letters only (e.g., 'Amendment AB'), return the letters exactly as they appear (e.g., 'AB',for 'Amendment XYZ' return 'XYZ').\n8. If multiple amendment numbers appear, return the one most clearly associated with the current document.\n9. If the document is an amendment but the number/identifier cannot be determined, return 'UNKNOWN'.\n10. If the document is not an amendment, return 'N/A'.\n11. If the amendment number contains any leading zeroes (e.g., '001'), drop all leading zeros (e.g., '1').",
|
||||
"retrieval_question": "What is the amendment number, letter, or alphanumeric identifier of this document? Amendment No., Amendment Number, Amendment Letter, Amendment Code, ordinal amendment, numbered amendment, lettered amendment, coded amendment? Amendment to agreement, amendment to contract."
|
||||
},
|
||||
{
|
||||
"field_name": "PROVIDER_STATE",
|
||||
|
||||
@@ -1381,11 +1381,17 @@ def EXTRACT_AMENDMENT_NUM_FROM_FILENAME(filename) -> str:
|
||||
|
||||
def EXTRACT_AMENDMENT_NUM_FROM_FILENAME_INSTRUCTION() -> str:
|
||||
return """[OBJECTIVE]\n
|
||||
Analyze the given filename string to extract the amendment number of the contract document if it exists.
|
||||
Return only numeric values representing the amendment number. categorical values like 'A','B' etc are not amednment numbers. If no amendment number is found, return N/A.
|
||||
Analyze the given filename string to extract the amendment number or identifier of the contract document if it exists.
|
||||
Amendment identifiers can be numeric, letters only, or alphanumeric. Follow these guidelines:
|
||||
- Numeric: '3', '12', '1' (with leading zeros dropped, e.g., '001' → '1')
|
||||
- Letters only: 'A', 'AB', 'B'
|
||||
- Alphanumeric: '3A', '2B', '1A2'
|
||||
- Roman numerals should be converted to numbers (e.g., 'IV' → '4')
|
||||
- Return the amendment identifier exactly as it appears in the filename, applying the above rules.
|
||||
If no amendment number or identifier is found, return N/A.
|
||||
Briefly explain your reasoning, then put your final answer in JSON dictionary format as follows:
|
||||
{{
|
||||
"amendment_number": "<extracted amendment number or N/A>"
|
||||
"amendment_number": "<extracted amendment number/identifier or N/A>"
|
||||
}}"""
|
||||
|
||||
|
||||
|
||||
@@ -425,8 +425,8 @@ def run_qc_qa_pipeline(
|
||||
|
||||
# Step 21: Flag for negative rates
|
||||
numeric_cols = [
|
||||
"CONTRACT_AMENDMENT_NUM",
|
||||
"AARETE_DERIVED_AMENDMENT_NUM",
|
||||
# "CONTRACT_AMENDMENT_NUM",
|
||||
# "AARETE_DERIVED_AMENDMENT_NUM",
|
||||
"REIMB_PCT_RATE",
|
||||
]
|
||||
for col in numeric_cols:
|
||||
|
||||
Reference in New Issue
Block a user