Merge branch 'aus_prospectus_ravi' of https://msstash.morningstar.com/scm/dc/dc-ml-emea-ar into aus_prospectus_ravi

This commit is contained in:
Russell Spence 2025-03-28 08:36:58 -05:00
commit ac6332ad46
8 changed files with 507 additions and 323 deletions

View File

@ -660,35 +660,35 @@ def final_function_to_match(doc_id, pred_list, db_list, provider_name, doc_sourc
# cleaned_response = llm_response['response'].strip("```json").strip("```").replace('\n', '')
# llm_result = json.loads(cleaned_response)
# logger.info(f"\n\n llm_result: {llm_result}")
for k,v in llm_result.items():
for pred_name,db_name in llm_result.items():
# print("k: ",k)
# print("v: ",v)
og_db_index=-1
# og_pred_index = -1
og_pred_index_list = []
if k in cleaned_unmatched_pred_list:
if pred_name in cleaned_unmatched_pred_list:
for c_idx, c_item in enumerate(cleaned_unmatched_pred_list):
if c_item==k:
if c_item==pred_name:
og_pred_index_list.append(c_idx)
# og_pred_index = cleaned_unmatched_pred_list.index(k)
if len(og_pred_index_list) == 0:
# sometimes, the raw name and db name reversed from the LLM response
if v in cleaned_unmatched_pred_list and k in cleaned_unmatched_db_list:
if db_name in cleaned_unmatched_pred_list and pred_name in cleaned_unmatched_db_list:
for c_idx, c_item in enumerate(cleaned_unmatched_pred_list):
if c_item==v:
if c_item==db_name:
og_pred_index_list.append(c_idx)
# og_pred_index = cleaned_unmatched_pred_list.index(v)
og_db_index = cleaned_unmatched_db_list.index(k)
og_db_index = cleaned_unmatched_db_list.index(pred_name)
# v and k are swapped
temp = v
v = k
k = temp
temp = db_name
db_name = pred_name
pred_name = temp
if len(og_pred_index_list)==0:
continue
# og_db_index = cleaned_unmatched_db_list.index(v)
if og_db_index == -1 and v in cleaned_unmatched_db_list:
og_db_index = cleaned_unmatched_db_list.index(v)
if og_db_index == -1 and db_name in cleaned_unmatched_db_list:
og_db_index = cleaned_unmatched_db_list.index(db_name)
# print("og_db_index: ",og_db_index, cleaned_unmatched_db_list)
# print("unmatched_db_list: ",unmatched_db_list)
@ -697,7 +697,7 @@ def final_function_to_match(doc_id, pred_list, db_list, provider_name, doc_sourc
if i['pred_fund']==unmatched_pred_list[og_pred_index]:
if og_db_index!=-1:
i['db_fund']=unmatched_db_list[og_db_index]
i['cleaned_db_fund_name'] = v
i['cleaned_db_fund_name'] = db_name
final_result.update({unmatched_pred_list[og_pred_index]:unmatched_db_list[og_db_index]})
else:
i['db_fund'] = ''
@ -705,8 +705,8 @@ def final_function_to_match(doc_id, pred_list, db_list, provider_name, doc_sourc
final_result.update({unmatched_pred_list[og_pred_index]:""})
i['llm_clean_pred_list'] = cleaned_unmatched_pred_list
i['llm_clean_db_list'] = cleaned_unmatched_db_list,
i['llm_pred_fund'] = k
i['llm_matched_db_name'] = v
i['llm_pred_fund'] = pred_name
i['llm_matched_db_name'] = db_name
i['llm_result'] = llm_result
break

View File

@ -11,7 +11,7 @@ from utils.sql_query_util import query_document_fund_mapping, query_investment_b
from utils.logger import logger
from utils.biz_utils import add_slash_to_text_as_regex, clean_text, \
get_most_similar_name, remove_abundant_data, replace_special_table_header
from utils.similarity import Similarity
class DataExtraction:
def __init__(
@ -289,6 +289,7 @@ class DataExtraction:
data_list = self.supplement_ttr_pension(data_list)
data_list = self.align_fund_share_name(data_list)
data_list = self.supplement_minimum_initial_investment(data_list)
data_list = self.check_total_annual_dollar_based_charges(data_list)
data_list, datapoint_list_with_production_name = self.post_adjust_for_value_with_production_name(data_list)
data_list = self.remove_duplicate_data(data_list)
if "management_fee" not in datapoint_list_with_production_name and "management_fee_and_costs" not in datapoint_list_with_production_name:
@ -394,11 +395,22 @@ class DataExtraction:
fund_name = data_item.get("fund_name", "")
if len(fund_name) == 0:
continue
share_name = data_item.get("share_name", "")
updated_fund_name = self.update_pension_ttr_fund_name(fund_name)
if updated_fund_name != fund_name:
fund_name = updated_fund_name
data_item["fund_name"] = fund_name
updated_share_name = self.update_pension_ttr_fund_name(share_name)
if updated_share_name != share_name:
share_name = updated_share_name
data_item["share_name"] = share_name
fund_name_splits = fund_name.split()
if fund_name_splits[-1] == "TTR":
if fund_name_splits[-1] == "TTR" and fund_name not in ttr_fund_name_list:
ttr_fund_name_list.append(fund_name)
exist_ttr = True
if fund_name_splits[-1] == "Pension":
if fund_name_splits[-1] == "Pension" and fund_name not in pension_fund_name_list:
pension_fund_name_list.append(fund_name)
exist_pension = True
if exist_ttr and exist_pension:
@ -449,6 +461,22 @@ class DataExtraction:
data.extend(new_item_list)
return data_list
def update_pension_ttr_fund_name(self, investment_name: str):
pension_prefix_list = ["retirement account", "account-based pension", "account based pension"]
ttr_prefix_list = ["transition to retirement account", "pre-retirement pension", "pre retirement pension"]
investment_name_lower = investment_name.lower()
for pension_prefix in pension_prefix_list:
if investment_name_lower.startswith(pension_prefix) and investment_name_lower != pension_prefix:
pension_prefix_split = pension_prefix.split()
investment_name = " ".join(investment_name.split()[len(pension_prefix_split):]) + " Pension"
break
for ttr_prefix in ttr_prefix_list:
if investment_name_lower.startswith(ttr_prefix) and investment_name_lower != ttr_prefix:
ttr_prefix_split = ttr_prefix.split()
investment_name = " ".join(investment_name.split()[len(ttr_prefix_split):]) + " TTR"
break
return investment_name
def check_administration_fees(self, data_list: list):
"""
If document source is aus_prospectus and document category is MIS, then remove the administration fees from data_list
@ -476,6 +504,36 @@ class DataExtraction:
pass
return data_list
def check_total_annual_dollar_based_charges(self, data_list: list):
"""
If found total_annual_dollar_based_charges and could be divisible by 52 or 12,
then set the fund name and share name to be document production name.
"""
for data_dict in data_list:
extract_data = data_dict.get("extract_data", {})
data = extract_data.get("data", [])
found = False
for data_item in data:
keys = list(data_item.keys())
fund_name = data_item.get("fund_name", "")
share_name = data_item.get("share_name", "")
if len(fund_name) == 0:
continue
if "total_annual_dollar_based_charges" in keys:
value = data_item.get("total_annual_dollar_based_charges", -1)
if len(str(value)) > 0:
value_divide_52 = value / 52
value_divide_12 = value / 12
if (value_divide_52 == round(value_divide_52, 4)) or \
(value_divide_12 == round(value_divide_12, 4)):
data_item["fund_name"] = self.document_production
data_item["share_name"] = self.document_production
found = True
break
if found:
break
return data_list
def post_adjust_for_value_with_production_name(self, data_list: list):
"""
If some datapoint with production name, then each fund/ share class in the same document for the datapoint should be with same value.
@ -484,7 +542,7 @@ class DataExtraction:
raw_name_list = list(raw_name_dict.keys())
raw_name_as_production_name = None
for raw_name in raw_name_list:
if raw_name.lower() in self.document_production.lower():
if self.is_production_name(raw_name):
raw_name_as_production_name = raw_name
break
datapoint_list_with_production_name = []
@ -505,7 +563,7 @@ class DataExtraction:
fund_name = data_item.get("fund_name", "")
share_name = data_item.get("share_name", "")
raw_name = self.get_raw_name(fund_name, share_name)
if raw_name.lower() in self.document_production.lower():
if self.is_production_name(raw_name):
dp_keys = [key for key in keys if key not in ["fund_name",
"share_name",
"management_fee_and_costs",
@ -557,6 +615,15 @@ class DataExtraction:
extract_data["data"].remove(remove_item)
return data_list, datapoint_list_with_production_name
def is_production_name(self, text: str):
if text.lower() in self.document_production.lower():
return True
simlarity_util = Similarity()
similarity = simlarity_util.edit_distance_similarity(text, self.document_production)
if similarity > 0.93:
return True
return False
def remove_duplicate_data(self, data_list: list):
"""
The purpose is to remove duplicate data in the different pages.
@ -668,9 +735,10 @@ class DataExtraction:
for mf in management_fee_list:
mf_fund_name = mf.get("fund_name", "")
mf_share_name = mf.get("share_name", "")
if (mf_fund_name == fund_name and mf_share_name == share_name) or \
(len(mf_fund_name) > 0 and len(mf_share_name) > 0 and mf_fund_name == mf_share_name and
(mf_share_name.endswith(share_name) or share_name.endswith(mf_share_name))):
# if (mf_fund_name == fund_name and mf_share_name == share_name) or \
# (len(mf_fund_name) > 0 and len(mf_share_name) > 0 and mf_fund_name == mf_share_name and
# (mf_share_name.endswith(share_name) or share_name.endswith(mf_share_name))):
if (mf_fund_name == fund_name and mf_share_name == share_name):
if exist_complex_rule_keywords and \
("interposed_vehicle_performance_fee_cost" in keys or "recoverable_expenses" in keys):
mf["management_fee"] = management_fee
@ -693,9 +761,10 @@ class DataExtraction:
for mfc in management_fee_costs_list:
mfc_fund_name = mfc.get("fund_name", "")
mfc_share_name = mfc.get("share_name", "")
if (mfc_fund_name == fund_name and mfc_share_name == share_name) or \
(len(mfc_fund_name) > 0 and len(mfc_share_name) > 0 and mfc_fund_name == mfc_share_name and
(mfc_share_name.endswith(share_name) or share_name.endswith(mfc_share_name))):
# if (mfc_fund_name == fund_name and mfc_share_name == share_name) or \
# (len(mfc_fund_name) > 0 and len(mfc_share_name) > 0 and mfc_fund_name == mfc_share_name and
# (mfc_share_name.endswith(share_name) or share_name.endswith(mfc_share_name))):
if (mfc_fund_name == fund_name and mfc_share_name == share_name):
if exist_complex_rule_keywords and \
("interposed_vehicle_performance_fee_cost" in keys or "recoverable_expenses" in keys):
mfc["management_fee_and_costs"] = management_fee_costs
@ -792,7 +861,7 @@ class DataExtraction:
previous_page_datapoints = []
previous_page_fund_name = None
for page_num, page_text in self.page_text_dict.items():
# if page_num not in [4, 5]:
# if page_num not in [13, 14]:
# continue
if page_num in handled_page_num_list:
continue
@ -1597,6 +1666,7 @@ class DataExtraction:
if page_text is not None and len(page_text) > 0:
logger.info(f"Transfer previous page fund name: {page_text} to be the pre-fix of page text")
summary += f"\nThe last fund name of previous PDF page: {page_text}\n"
summary += "If could find the fund name for the first data point value, please ignore this fund name.\n"
else:
summary = self.instructions_config.get("summary", "\n")
@ -1608,7 +1678,7 @@ class DataExtraction:
instructions.extend(image_features)
instructions.append("\n")
instructions.append("Datapoints Reported name:\n")
instructions.append("## Datapoints Reported name\n")
instructions.append("Please look for relevant reported names and similar variations in the context.\n")
reported_name_info_in_instructions = self.instructions_config.get("reported_name", {})
for datapoint in datapoints:
@ -1708,7 +1778,7 @@ class DataExtraction:
none_value_example_count += 1
instructions.append("\n")
instructions.append("Data business features:\n")
instructions.append("## Data business features\n")
data_business_features = self.instructions_config.get(
"data_business_features", {}
)
@ -1716,7 +1786,7 @@ class DataExtraction:
instructions.append(common)
instructions.append("\n")
instructions.append("Datapoints investment level:\n")
instructions.append("## Datapoints investment level\n")
investment_level_info = data_business_features.get("investment_level", {})
for datapoint in datapoints:
investment_level = investment_level_info.get(datapoint, "")
@ -1724,7 +1794,7 @@ class DataExtraction:
instructions.append("\n")
instructions.append("\n")
instructions.append("Datapoints value range:\n")
instructions.append("## Datapoints value range\n")
data_value_range_info = data_business_features.get("data_value_range", {})
for datapoint in datapoints:
data_value_range = data_value_range_info.get(datapoint, "")
@ -1738,7 +1808,13 @@ class DataExtraction:
# 2. To load it by keywords, is to avoid for simple case, the prompts are too long.
complex_special_rule = data_business_features.get("sepcial_rule_by_keywords", "")
with_special_rule_title = False
found_sub_datapoints = []
datapoint_special_rule = {}
for datapoint in datapoints:
# If some complex special rule is found, and with sub datapoints,
# need not to load relevant rule again.
if datapoint in found_sub_datapoints:
continue
find_complex_special_rule = False
if page_text is not None and len(page_text) > 0:
complex_special_rule_list = complex_special_rule.get(datapoint, [])
@ -1746,8 +1822,15 @@ class DataExtraction:
complex_keywords = complex_special_rule.get("keywords", [])
if len(complex_keywords) == 0:
continue
# support keywords to be pure text or regex
keywords_is_regex = complex_special_rule.get("keywords_is_regex", False)
exist_keywords = False
for special_keywords in complex_keywords:
if keywords_is_regex:
if re.search(special_keywords, page_text) is not None:
exist_keywords = True
break
else:
special_keywrods_regex = add_slash_to_text_as_regex(special_keywords)
if special_keywords in page_text or \
re.search(special_keywrods_regex, page_text) is not None:
@ -1757,18 +1840,28 @@ class DataExtraction:
complex_prompts_list = complex_special_rule.get("prompts", [])
if len(complex_prompts_list) > 0:
if not with_special_rule_title:
instructions.append("Special rule:\n")
instructions.append("## Special rule\n")
with_special_rule_title = True
complex_prompts = "\n".join(complex_prompts_list)
instructions.append(complex_prompts)
instructions.append("\n\n")
find_complex_special_rule = True
# If the complex special rule is found, need to find the sub datapoints
# and add them to the found_sub_datapoints list.
sub_datapoints = complex_special_rule.get("sub_datapoints", [])
if len(sub_datapoints) > 0:
found_sub_datapoints.extend(sub_datapoints)
if find_complex_special_rule:
continue
special_rule_list = special_rule_info.get(datapoint, [])
if len(special_rule_list) > 0:
datapoint_special_rule[datapoint] = special_rule_list
if len(list(datapoint_special_rule.keys())) > 0:
for datapoint, special_rule_list in datapoint_special_rule.items():
if datapoint in found_sub_datapoints:
continue
if not with_special_rule_title:
instructions.append("Special rule:\n")
instructions.append("## Special rule\n")
with_special_rule_title = True
special_rule = "\n".join(special_rule_list)
instructions.append(special_rule)
@ -1776,7 +1869,7 @@ class DataExtraction:
instructions.append("\n")
instructions.append("Special cases:\n")
instructions.append("## Special cases\n")
special_cases = self.instructions_config.get("special_cases", {})
special_cases_common_list = special_cases.get("common", [])
special_cases_number = 1
@ -1789,7 +1882,7 @@ class DataExtraction:
contents_list = special_cases_common.get("contents", [])
contents = "\n".join(contents_list)
instructions.append(contents)
instructions.append("\n\n")
instructions.append("\n")
for datapoint in datapoints:
special_case_list = special_cases.get(datapoint, [])
@ -1803,9 +1896,8 @@ class DataExtraction:
contents = "\n".join(contents_list)
instructions.append(contents)
instructions.append("\n")
instructions.append("\n")
instructions.append("Output requirement:\n")
instructions.append("## Output requirement\n")
output_requirement = self.instructions_config.get("output_requirement", {})
output_requirement_common_list = output_requirement.get("common", [])
instructions.append("\n".join(output_requirement_common_list))

View File

@ -16,9 +16,9 @@
],
"data_business_features": {
"common": [
"General rules:",
"- 1. The data is in the context, perhaps in table(s), semi-table(s) or paragraphs.",
"- 2. Fund name: ",
"## General rules",
"1. The data is in the context, perhaps in table(s), semi-table(s) or paragraphs.",
"2. Fund name: ",
"a. The full fund name should be main fund name + sub-fund name, e,g, main fund name is Black Rock European, sub-fund name is Growth, the full fund name is: Black Rock European Growth.",
"b. The sub-fund name may be as the first column or first row values in the table.",
"b.1 fund name example:",
@ -48,13 +48,31 @@
"---Example End---",
"Correct fund name: MLC Horizon 2 Income Portfolio",
"Correct share name: MLC Horizon 2 Income Portfolio",
"f. In table header, \"Retirement account\" or \"Account-based pension\" means \"Pension\"; ",
"\"Transition to Retirement account\" or \"Pre-retirement pension\" means \"TTR\". ",
"Please append them to the fund name and share name.",
"f.1 Example 1",
"---Example 1 Start---",
"Retirement account \n\nInvestment option \n(A) Investment fees \nand costs (including \n(B) performance \nfees) (pa)* \n(B) Performance \nfees (pa) \n# \n(C) Transaction \ncosts (pa)*^ \n(A) + (C) Total \ninvestment cost \n(pa) \nCash 0.05%0.00% 0.00% 0.05%\n",
"---Example 1 End---",
"The prefix is \"Retirement account\", the investment option is \"Cash\", so fund name and share name should be: \"Retirement account Cash\".",
"f.2 Example 2",
"---Example 2 Start---",
"Transition to Retirement account \n\nInvestment option \n(A) Investment fees \nand costs (including \n(B) performance \nfees) (pa)* \n(B) Performance \nfees (pa) \n# \n(C) Transaction \ncosts (pa)*^ \n(A) + (C) Total \ninvestment cost \n(pa) \nCash 0.05%0.00% 0.00% 0.05%\n",
"---Example 2 End---",
"The prefix is \"Transition to Retirement account\", the investment option is \"Cash\", so fund name and share name should be: \"Transition to Retirement account Cash\".",
"f.3 Example 3",
"---Example 3 Start---",
"Fees and costs* \n\nRetirement account Transition to Retirement account \nAdministration fees (taken directly \nfrom your account) \n$1.50 per week plus 0.10% pa of your account balance on the day the fee \nis deducted (0.10% pa component is capped at $300 pa). \nAdministration costs (not taken \ndirectly from your account) \nThis is deducted from the Funds reserves throughout the year, not your account. \n0.09% pa (based on costs for the financial year ended 30 June 2024). \n\n\nRest Pension Product Disclosure Statement \n\n6",
"---Example 3 End---",
"Although exist \"Retirement account\" and \"Transition to Retirement account\", but the investment option is not exist, so fund name and share name should be: \"Rest Pension\".",
"\n",
"- 3. Only extract the latest data from context:",
"3. Only extract the latest data from context:",
"If with multiple data values in same row, please extract the latest.",
"\n",
"- 4. Reported names:",
"4. Reported names:",
"Only output the values which with significant reported names.",
"- Multiple data columns with same reported name but different post-fix:",
"Multiple data columns with same reported name but different post-fix:",
"If there are multiple reported names with different post-fix text, here is the priority rule:",
"The pos-fix text is in the brackets: (gross), (net), pick up the values from (net).",
"---Example Start---",
@ -62,8 +80,14 @@
"---Example End---",
"The output should be:",
"{\"data\": [{\"fund name\": \"Allan Gray Australian Equity Fund\", \"share name\": \"Class A\", \"management_fee_and_costs\": 1.19, \"management_fee\": 0.77, \"administration_fees\": 0.42}]}",
"- 6. Please ignore these words as fund names, it means never extract these words as fund names. They are:",
"\"Ready-made portfolios\", \"Simple choice\", \"Build-your-own portfolio\"."
"5. Please ignore these words as fund names, it means never extract these words as fund names. They are:",
"\"Ready-made portfolios\", \"Simple choice\", \"Build-your-own portfolio\".",
"6. Identify the value of data point and if it is written 0% or 0.00% or 0 or 0.00 then extract the same as 0 do not assume null for the same and return its values as 0",
"---Example Start---",
"Retirement account \n\nInvestment option \n(A) Investment fees \nand costs (including \n(B) performance \nfees) (pa)* \n(B) Performance \nfees (pa) \n# \n(C) Transaction \ncosts (pa)*^ \n(A) + (C) Total \ninvestment cost \n(pa) \nBalanced Indexed 0.00% 0.00% 0.00% 0.00%\n",
"---Example End---",
"For this example, as \"Investment fees and costs (including (B) performance fees)\" and \"Performance fees (pa)\" mentioned as 0.00% so return 0 as datapoint values.",
"7. If for data point value specifically Nil is written in the value then return NULL('') for the same"
],
"investment_level": {
"total_annual_dollar_based_charges": "Total annual dollar based charges is share level data.",
@ -120,8 +144,9 @@
},
"special_rule": {
"management_fee_and_costs": [
"### Management fee and cost",
"Management fee and cost = Management fee + indirect cost + recoverable expense (Also known as Expense recovery cost or recovery fee or Expense recovery fee or expense recoveries) + Manager fee or Responsible entity fee.",
"If there are multiple Management fee and costs reported names, here is the priority rule:",
"A. If there are multiple Management fee and costs reported names, here are the priority rules:",
"A.1 With \"Total Management fees and costs (gross)\" and \"Total Management fees and costs (net)\", pick up the values from \"Total Management fees and costs (net)\".",
"---Example 1 Start---",
"\n Investment option \nInvestment option \nmanagement \ncosts1 \n% p.a. \n(A)\nLifeplan \nadministration fee \n(gross)2 \n% p.a. \n(B)\nLifeplan \nadministration fee \n(net) \n% p.a. \n(C)\nTotal Management \nfees and costs \n(gross) \n% p.a. \n(A + B)\nTotal Management \nfees and costs \n(net) \n% p.a. \n(A + C)\nAllan Gray Australian Equity Fund \u2013 Class A\n0.77\n0.60\n0.42\n1.37\n1.19\n",
@ -172,7 +197,7 @@
"The management_fee is the value of \"Management fee (% pa)\".",
"The management_fee_and_costs is the value of \"Total management cost (% pa)\".",
"---Example 1 Start---",
"Fund/Investment\nOption\nManagement\nfee (% pa)\nEstimated \nPerformance \n-related \nfees \nEstimated\nother\nindirect\ncosts\nEstimated\nexpense\nrecoveries\nEstimated\nRegulatory\nChange\nExpense\nRecovery\nTotal\nmanagement\ncost (% pa)\nEstimated\nbuy-sell\nspread (%)\nBT Future \nGoals Fund \n1.33 0.000.04 0.000.01 1.38 0.31\n1.29 0.000.00 0.000.01 1.30 0.29\n",
"Fund/Investment\nOption\nManagement\nfee (% pa)\nEstimated \nPerformance \n-related \nfees \nEstimated\nother\nindirect\ncosts\nEstimated\nexpense\nrecoveries\nEstimated\nRegulatory\nChange\nExpense\nRecovery\nTotal\nmanagement\ncost (% pa)\nEstimated\nbuy-sell\nspread (%)\nBT Future \nGoals Fund \n1.33 0.00 0.04 0.00 0.01 1.38 0.31\n1.29 0.00 0.00 0.00 0.01 1.30 0.29\n",
"---Example 1 End---",
"The output should be:",
"{\"data\": [{\"fund name\": \"BT Future Goals Fund\", \"share name\": \"BT Future Goals Fund\", \"management_fee_and_costs\": 1.38, \"management_fee\": 1.33, \"indirect_costs\": 0.04, \"recoverable_expenses\": 0, \"change_recoverable_expenses\": 0.01, \"performance_fee_costs\": 0, \"buy_spread\": 0.31, \"sell_spread\": 0.31}]}",
@ -201,6 +226,7 @@
"---Example 3 Start---",
"Fund name \nManagement \nfees and costs \n(p.a.) 1 \nBuy/sell \nspread \n(%) 2 \nLOWER VOLATILITY SHARE \nFirst Sentier Wholesale Equity \nIncome Fund \n1.22% 0.05\nFirst Sentier Wholesale Geared \nShare Fund 3 \n1.04%(g)/2.18%(n) 4 0.200.50 5 \n\n",
"---Example 3 End---",
"For value: 1.04%(g)/2.18%(n), (g) means gross, (n) means net, please extract net value: 2.18",
"The output should be:",
"{\"data\": [{\"fund name\": \"First Sentier Wholesale Equity Income Fund\", \"share name\": \"First Sentier Wholesale Equity Income Fund\", \"management_fee_and_costs\": 1.22, \"management_fee\": 1.22, \"buy_spread\": 0.05, \"sell_spread\": 0.05}, {\"fund name\": \"First Sentier Wholesale Geared Share Fund\", \"share name\": \"First Sentier Wholesale Geared Share Fund\", \"management_fee_and_costs\": 2.18, \"management_fee\": 2.18, \"buy_spread\": 0.5, \"sell_spread\": 0.5}]}",
"\n",
@ -211,7 +237,8 @@
"The output should be:",
"{\"data\": [{\"fund name\": \"Vanguard High Growth Index Fund\", \"share name\": \"Vanguard High Growth Index Fund\", \"management_fee_and_costs\": 1.5, \"management_fee\": 1.5}]}",
"\n",
"F. If with columns \"Investment fees and costs\" or \"Investment fees and costs (excl Performance Fees)\", \"Performance Fee\", \"Transaction costs\", \"Total investment fees and costs\", please only extraction values from \"Investment fees and costs\" or \"Investment fees and costs (excl Performance Fees)\", output the relevant same value for both of data point keys: \"management_fee_and_costs\" and \"management_fee\".",
"F. If columns \"Investment fees and costs\" or \"Investment fees and costs (excl Performance Fees)\", \"Performance Fee\", \"Transaction costs\", \"Total investment fees and costs\" appear, please only extraction values from \"Investment fees and costs\" or \"Investment fees and costs (excl Performance Fees)\" for EACH SPECIFIC investment option. ",
"DO NOT assume these values apply to other investment options mentioned elsewhere in the context or from provided examples.",
"---Example 1 Start---",
"\n\nInvestment option \nInvestment fees \nand costs (excl \nPerformance Fees) \nPerformance \nFee \nTransaction \ncosts \nTotal \ninvestment \nfees and costs \nBalanced 0.53% 0.43% 0.13%1.09% \nCapital Stable \n0.32% \n0.18% \n0.09% \n0.59% \n",
"---Example 1 End---",
@ -251,85 +278,102 @@
"Both of management_fee and management_fee_and_costs are the values for \"Management costs\", so the output should be:",
"{\"data\": [{\"fund name\": \"FirstChoice Wholesale Defensive\", \"share name\": \"FirstChoice Wholesale Defensive\", \"management_fee_and_costs\": 0.85, \"management_fee\": 0.85}, {\"fund name\": \"FirstChoice Wholesale Conservative\", \"share name\": \"FirstChoice Wholesale Conservative\", \"management_fee_and_costs\": 0.9, \"management_fee\": 0.9, \"performance_fee_costs\": 0.02}]}",
"---Example 2 Start---",
"Retirement account \n\nInvestment option \n(A) Investment fees \nand costs (including \n(B) performance \nfees) (pa)* \n(B) Performance \nfees (pa) \n# \n(C) Transaction \ncosts (pa)*^ \n(A) + (C) Total \ninvestment cost \n(pa) \nCapital Stable 0.46% 0.04% 0.08% 0.54%\nBalanced 0.52% 0.06% 0.10%0.62% \n",
"---Example 2 End",
"The column: \"(A) Investment fees and costs (including (B) performance fees) (pa)*\" includes \"(B) performance fees) (pa)*\", we should subtract the \"(B) performance fees) (pa)*\" value, just output the pure management fee and costs value.",
"Besides, the \"Retirement account\" is the pre-fix fund name, should output it with fund/ share name together, e.g. \"Retirement account Capital Stable\"",
"The output should be:",
"{\"data\": [{\"fund name\": \"Retirement account Capital Stable\", \"share name\": \"Retirement account Capital Stable\", \"management_fee_and_costs\": 0.42, \"management_fee\": 0.42, \"performance_fee_costs\": 0.04}, {\"fund name\": \"Retirement account Balanced\", \"share name\": \"Retirement account Balanced\", \"management_fee_and_costs\": 0.46, \"management_fee\": 0.46, \"performance_fee_costs\": 0.06}]}",
"---Example 3 Start---",
"Investment \noption \nInvestment fees and \ncosts (p.a.) \n1 \nTransaction \ncosts (p.a.) \nMySuper/ \nBalanced \n0.38% (including 0.09% \nPerformance fee) \n0.18% \nManaged \nGrowth \n0.38% (including 0.11% \nPerformance fee) \n0.08% \n",
"---Example 2 End---",
"---Example 3 End---",
"The column: \"Investment fees and costs (p.a.)\", \"including Performance fee\", meaning the value is the sum of \"Management costs\" and \"performance fee\", We should subtract the \"performance fee\" value, just output the \"Management costs\" value.",
"Both of management_fee and management_fee_and_costs are the values for \"Management costs\".",
"So, for fund: MySuper/Balanced, the value 0.38, including 0.09 Performance fee, so the Management costs is 0.38 - 0.09 = 0.29, performance_fee_costs is 0.09.",
"For fund: Managed Growth, the value 0.38, including 0.11 Performance fee, so the Management costs is 0.38 - 0.11 = 0.27, performance_fee_costs is 0.11.",
"So the output should be:",
"{\"data\": [{\"fund name\": \"MySuper/Balanced\", \"share name\": \"MySuper/Balanced\", \"management_fee_and_costs\": 0.29, \"management_fee\": 0.29, \"performance_fee_costs\": 0.09}, {\"fund name\": \"Managed Growth\", \"share name\": \"Managed Growth\", \"management_fee_and_costs\": 0.27, \"management_fee\": 0.27, \"performance_fee_costs\": 0.11}]}",
"---Example 3 Start---",
"Fund name \nTotal of management \nfees and costs and \nperformance \nfees (% p.a.) \n= \nManagement \nfees and costs \n(% p.a.) \n+ \nPerformance \nfee (% p.a.) \nBuy/sell \nspread \nCFS Real Return Class A 1 \n0.87% \n0.87% \n0.15% \nCFS Defensive Builder \n0.68% \n0.67% \n0.01% \n0.15% \n",
"---Example 3 End---",
"The column: \"Total of management fees and costs and performance fees (% p.a.)\", meaning the value is the sum of \"Management fee and costs\" and \"performance fee\", We should ignore this column values.",
"The column \"Management fees and costs (% p.a.)\" is the value of \"Management fee and costs\".",
"Both of management_fee and management_fee_and_costs are the values for \"Management fees and costs (% p.a.)\" for this case.",
"If there are 3 decimal numbers, the 2nd decimal number is the management_fee_and_costs and management_fee, the 3rd decimal number is the buy_spread and sell_spread.",
"If there are 4 decimal numbers, the 2nd decimal number is the management_fee_and_costs and management_fee, the 3rd decimal number is the performance_fee_costs, the 4th decimal number is buy_spread and sell_spread.",
"So the output should be:",
"{\"data\": [{\"fund name\": \"CFS Real Return Class A\", \"share name\": \"CFS Real Return Class A\", \"management_fee_and_costs\": 0.87, \"management_fee\": 0.87, \"buy_spread\": 0.15, \"sell_spread\": 0.15}, {\"fund name\": \"CFS Defensive Builder\", \"share name\": \"CFS Defensive Builder\", \"management_fee_and_costs\": 0.67, \"management_fee\": 0.67, \"performance_fee_costs\": 0.01, \"buy_spread\": 0.15, \"sell_spread\": 0.15}]}",
"\n",
"I. Some table is very complex, with many data points columns, please extract the relevant values.",
"---Example 1 Start---",
"Option name \nTotal administration\nand investment\nfees and costs (p.a.)\n= \nAdministration\nfees and\ncosts (p.a.)\n+ \nInvestment fees \nand costs (p.a.) \n2 \n+ \nPerformance \nfee (p.a.) \n1 \nBuy/sell\nspread\n(%)\n6 \nCFS Multi-Manager Multi-Sector (These investment options are located in the Investment Options Menu.) \nCFS Defensive \n0.94% \n0.20% 0.74%0.15 \nCFS Conservative 1.04% \n1 \n0.20% 0.81% 0.03%\n1 \n0.15 \n",
"---Example 1 End---",
"For this table, there are \"Administration fees and costs (p.a.)\" as administration_fees, ",
"\"Investment fees and costs (p.a.)\" as management_fee_and_costs and management_fee, ",
"\"Performance fee (p.a.)\" as performance_fee_costs, ",
"\"Buy/sell spread (%)\" as buy_spread and sell_spread.",
"If one row has 5 decimal numbers, ",
"the 2nd decimal number is the administration_fees, ",
"the 3rd decimal number is the management_fee_and_costs and management_fee, ",
"the 4th decimal number is the performance_fee_costs, ",
"the 5th decimal number is the buy_spread and sell_spread.",
"If one row has 4 decimal numbers, ",
"the 2nd decimal number is the administration_fees, ",
"the 3rd decimal number is the management_fee_and_costs and management_fee, ",
"the 4th decimal number is the buy_spread and sell_spread.",
"Please always ignore the 1st decimal number, we need not the total sum values.",
"The output should be:",
"{\"data\": [{\"fund name\": \"CFS Multi-Manager Multi-Sector\", \"share name\": \"CFS Defensive\", \"management_fee_and_costs\": 0.74, \"management_fee\": 0.74, \"administration_fees\": 0.2, \"buy_spread\": 0.15, \"sell_spread\": 0.15}, {\"fund name\": \"CFS Multi-Manager Multi-Sector\", \"share name\": \"CFS Conservative\", \"management_fee_and_costs\": 0.81, \"management_fee\": 0.81, \"administration_fees\": 0.20, \"performance_fee_costs\": 0.03, \"buy_spread\": 0.15, \"sell_spread\": 0.15}]}",
"J. If exist **\"Maximum management fee\"** in context, please ignore relevant values.",
"I. If exist **\"Maximum management fee\"** in context, please ignore relevant values.",
"---Example Start---",
"Fund name \nMaximum \nmanagement \nfee (p.a.) \nLOWER VOLATILITY SHARE \nFirst Sentier Wholesale Equity Income Fund 3.075% \nAUSTRALIAN SHARE \nFirst Sentier Wholesale Australian Share Fund 1.538%",
"---Example End---",
"The values in example is **Maximum management fee**, should ignore all of them.",
"The Output should be:",
"{\"data\": []}"
"{\"data\": []}",
"J. The management fee and costs in paragraph with speficic fund/ share prefix name: \"Account-based pension\" or \"Pre-retirement pension\"",
"---Example 1 Start---",
"Account-based pension \nInvestment fees \nand costs 2 \nHigh Growth 0.45%, Growth 0.49%",
"---Example 1 End---",
"The output should be:",
"{\"data\": [{\"fund name\": \"Account-based pension High Growth\", \"share name\": \"Account-based pension High Growth\", \"management_fee_and_costs\": 0.45, \"management_fee\": 0.45}, {\"fund name\": \"Account-based pension Growth\", \"share name\": \"Account-based pension Growth\", \"management_fee_and_costs\": 0.49, \"management_fee\": 0.49}]}",
"---Example 2 Start---",
"Pre-retirement pension \nWe generally calculate \nand deduct this fee daily when unit \nprices are determined. \nHigh Growth 0.48%, Growth 0.50%",
"---Example 2 End---",
"The output should be:",
"{\"data\": [{\"fund name\": \"Pre-retirement pension High Growth\", \"share name\": \"Pre-retirement pension High Growth\", \"management_fee_and_costs\": 0.48, \"management_fee\": 0.48}, {\"fund name\": \"Pre-retirement pension Growth\", \"share name\": \"Pre-retirement pension Growth\", \"management_fee_and_costs\": 0.50, \"management_fee\": 0.50}]}",
"K. DO NOT extract management fees from \"Cost of product\" summaries. ",
"\"Cost of product\" figures should not be treated as 'Investment fees and costs'.",
"---Example Start---",
"Investment option Cost of product \nCash $141.00",
"---Example End---",
"FOUND \"Cost of product\", IGNORE ALL OF INFORMATION BELOW IT!!! JUST RETURN EMPTY RESPONSE!!!",
"The output should be:",
"{\"data\": []}",
"L. Do NOT infer or copy investment fees or management fees from examples provided for specific funds to other investment options. Only extract 'management_fee_and_costs' and 'management_fee' if explicitly stated separately for each investment option.",
"M. Identify the value of management fee and costs, and if it is written 0% or 0.00% or 0 or 0.00, then extract the same as 0, please don't ignore it."
],
"administration_fees":[
"### Administration fees and costs",
"Administration fees and costs and total annual dollar-based charges are share class level data.",
"Simple case:",
"----Example 1 Start----",
"Fees and costs summary \n\nLegalsuper Pension \n\nType of fee or cost Amount How and when paid \nOngoing annual fees and costs \n1 \nAdministration fees and \ncosts \n$67.60 pa ($1.30 per week) plus 0.29% pa \nof your account balance \n",
"Fees and costs summary \n\nVision income streams \n\nType of fee Amount How and when paid \nOngoing annual fees and costs \n1 \nAdministration fees and \ncosts \n2 \n0.25% pa of your account balance (made up of \n0.25% of your account balance which is capped \nat $1,050 pa plus a reserving margin of 0.00% \npa of each investment options assets).",
"----Example 1 End----",
"According to example, the administration fee is 0.25% pa, so administration_fees is 0.25, ",
"The output should be:",
"{\"data\": [{\"fund name\": \"Vision income streams\", \"share name\": \"Vision income streams\", \"administration_fees\": 0.25}]}",
"\n",
"----Example 2 Start----",
"Fees and costs summary \n\nLegalsuper Pension \n\nType of fee or cost Amount How and when paid \nOngoing annual fees and costs \n1 \nAdministration fees and \ncosts \n$67.60 pa ($1.30 per week) plus 0.29% pa \nof your account balance \n",
"----Example 2 End----",
"According to example, the administration fee is $1.30 per week plus 0.29% pa, so administration_fees is 0.29, ",
"total_annual_dollar_based_charges is 1.30 * 52 = 67.6",
"The output should be:",
"{\"data\": [{\"fund name\": \"Legalsuper Pension\", \"share name\": \"Legalsuper Pension\", \"administration_fees\": 0.29, \"total_annual_dollar_based_charges\": 67.6}]}",
"\n",
"----Example 2 Start----",
"----Example 3 Start----",
"At a glance summary \n\nImportant information about TelstraSuper RetireAccess income streams \n\nAdministration fee • \n• \n$1.00 per week plus 0.17% pa - if you have more than one account the $1.00 per \nweek fee will only apply to one account \nA fee rebate applies if your balance exceeds $1m, or if your and your spouses \ncombined account balances exceed $969,410 (conditions apply)",
"----Example 2 End----",
"----Example 3 End----",
"According to example, the administration fee is $1.00 per week plus 0.17% pa, so administration_fees is 0.17, ",
"total_annual_dollar_based_charges is 1 * 52 = 52",
"The output should be:",
"{\"data\": [{\"fund name\": \"TelstraSuper RetireAccess\", \"share name\": \"TelstraSuper RetireAccess\", \"administration_fees\": 0.17, \"total_annual_dollar_based_charges\": 52}]}",
"---Example 3 Start---",
"\n",
"---Example 4 Start---",
"\nPrime Super Income Stream\nType of fee \nor cost \nAmount How and when paid \nOngoing annual fees and costs \n1 \nAdministration \nfees and costs \nAdministration \nfees of $1.30 \nper week \nPlus \n0.50% p.a. of \nyour account \nbalance, capped \nat $500 p.a. \nDeducted from your \naccount on the last \nbusiness day of each \nmonth, except if you \nare leaving Prime \nSuper, in which case \nit is deducted prior to \nyour exit from Prime \nSuper. \nInvestment \nfees and costs \n2 \n0.07% to 1.00% \nof assets p.a. \ndepending on \nthe investment \noption \nTaken into account \nprior to the declaration \nof weekly earning \nrates. This cost is not \ndeducted directly from \nyour account. \n",
"---Example 3 End---",
"---Example 4 End---",
"According to example, the administration fee is $1.30 per week plus 0.50% p.a., so administration_fees is 0.5, ",
"total_annual_dollar_based_charges is 1.30 * 52 = 67.6",
"The output should be:",
"{\"data\": [{\"fund name\": \"Prime Super Income Stream\", \"share name\": \"Prime Super Income Stream\", \"administration_fees\": 0.5, \"total_annual_dollar_based_charges\": 67.6}]}",
"---Example 4 Start---",
"\n",
"---Example 5 Start---",
"At a glance summary \n\nImportant information about TelstraSuper RetireAccess income streams \n\nTTR income stream Retirement income stream Reference \nAdministration fee • \n• \n$1.00 per week plus 0.17% pa - if you have more than one account the $1.00 per \nweek fee will only apply to one account \nA fee rebate applies if your balance exceeds $1m, or if your and your spouses \ncombined account balances exceed $969,410 (conditions apply) \nRefer to the Fees and \nother costs section on \npages 40-46 for details \n",
"---Example 4 End---",
"---Example 5 End---",
"According to example, the administration fee is $1.00 per week plus 0.17% pa, so administration_fees is 0.17, ",
"total_annual_dollar_based_charges is 1 * 52 = 52",
"The output should be:",
"{\"data\": [{\"fund name\": \"TelstraSuper RetireAccess\", \"share name\": \"TelstraSuper RetireAccess\", \"administration_fees\": 0.17, \"total_annual_dollar_based_charges\": 52}]}",
"---Example 6 Start---",
"Administration \nfees and costs \n1 \nFirstChoice Lifestage (MySuper product) \nand Select investment options \n(other than FirstRate Saver) \n0.04% p.a. \nThe percentagebased administration fee is reflected in \nthe daily unit price of your investment option and payable \nmonthly or as incurred by the option. \nFirstRate Saver \nFrom 0.35% to \n0.50% p.a. \nThe dollarbased administration fee of $5 per month is \npayable at the beginning of each month by deduction of \nunits from one of your options. \nDollar-based fee discounts \nThe current fee for FirstRate Saver is set out at \ncfs.com.au/personal/resources/funds-and-performance/ \nfirstrateinterestrates.html \nYour employer may be able to negotiate a lower dollar \nbased administration fee for employee members. \nplus \nDollar-based administration fee \nRetained benefit and spouse members are not entitled \nto this discount. \n$60 p.a. ($5 per month) per account \n",
"---Example 6 Start---",
"According to example, the administration fee is 0.04, ",
"\"From 0.35% to 0.50% p.a.\", because it is the range value, need ignore and exclude, so administration_fees is 0.04, ",
"the total_annual_dollar_based_charges is 60 (5 per month * 12)",
"About fund name, it should be \"FirstChoice Lifestage\".",
"The output should be:",
"{\"data\": [{\"fund name\": \"FirstChoice Lifestage\", \"share name\": \"FirstChoice Lifestage\", \"administration_fees\": 0.04, \"total_annual_dollar_based_charges\": 60}]}",
"\n",
"Complex cases:",
"A. Need to add multiple numbers together.",
@ -341,11 +385,34 @@
"The output should be:",
"{\"data\": [{\"fund name\": \"MLC MasterKey Super & Pension Fundamentals\", \"share name\": \"MLC MasterKey Super & Pension Fundamentals\", \"administration_fees\": 0.32}]}",
"---Example 2 Start---",
"Fees and costs summary\n\nHostplus Superannuation and Personal Super Plan \n\nType of fee \nAmount \nHow and when paid \nOngoing annual fees and costs1 \nAdministration \nfees and costs \n$78.00 p.a. \n($1.50 per week) \nplus $32.24 p.a. \nDeducted monthly from \nyour account. \nDeducted from the Funds \nAdministration Reserve \nthroughout the year (and \nnot from your account). \nplus trustee fee \nof 0.0165% p.a. \nof your account \nbalance. \n",
"Mine Super\nType of fee or cost Amount (% pa) How and when paid \nOngoing annual fees and costs \n1 \nWe generally calculate and \ndeduct this fee daily when unit \nprices are determined. \nAdministration fees \nand costs \n0.16% pa \nPlus \n0.031% pa. \n",
"---Example 2 End---",
"Attention: about plus trustee fee of 0.0165% p.a. of your account balance., it's only part of administration_fees, missing the \"first\" part, so please ignore the 0.0165% as administration_fees."
"According to example, the relevant values: 0.16% and 0.031%, so administration_fees is 0.16 + 0.031 = 0.191",
"The output should be:",
"{\"data\": [{\"fund name\": \"Mine Super\", \"share name\": \"Mine Super\", \"administration_fees\": 0.191}]}",
"---Example 3 Start---",
"Fees and costs* \n\nRetirement account Transition to Retirement account \nAdministration fees (taken directly \nfrom your account) \n$1.50 per week plus 0.10% pa of your account balance on the day the fee \nis deducted (0.10% pa component is capped at $300 pa). \nAdministration costs (not taken \ndirectly from your account) \nThis is deducted from the Funds reserves throughout the year, not your account. \n0.09% pa (based on costs for the financial year ended 30 June 2024). \n\n\nRest Pension Product Disclosure Statement \n\n6",
"---Example 3 End---",
"According to the example, the administration fee is $1.50 per week plus 0.10% pa, Administration costs is 0.09% pa so administration_fees is 0.1 + 0.09 = 0.19, ",
"total_annual_dollar_based_charges is 1.50 * 52 = 78",
"The output should be:",
"{\"data\": [{\"fund name\": \"Rest Pension\", \"share name\": \"Rest Pension\", \"administration_fees\": 0.19, \"total_annual_dollar_based_charges\": 78}]}",
"---Example 4 Start---",
"Fees and costs summary\n\nHostplus Superannuation and Personal Super Plan \n\nType of fee \nAmount \nHow and when paid \nOngoing annual fees and costs1 \nAdministration \nfees and costs \n$78.00 p.a. \n($1.50 per week) \nplus $32.24 p.a. \nDeducted monthly from \nyour account. \nDeducted from the Funds \nAdministration Reserve \nthroughout the year (and \nnot from your account). \nplus trustee fee \nof 0.0165% p.a. \nof your account \nbalance. \n",
"---Example 4 End---",
"Attention: about plus trustee fee of 0.0165% p.a. of your account balance., it's only part of administration_fees, missing the \"first\" part, so please ignore the 0.0165% as administration_fees, only output total_annual_dollar_based_charges as 78.",
"B. The administration fee and costs/ total annual dollar-based charges are with production name, other data points/ values are with specific fund/ share name(s).",
"---Example Start---",
"My Super \nType of fee or cost Amount How and when paid \nOngoing annual fees and costs 1 \nAdministration fees and costs \n$26.00 p.a. \nplus \n0.17% p.a. of account balance (subject to a \nmaximum of $1,000 p.a.) \n$0.50 per week deducted from your account\nbalance at the end of each month or on exit.\nPercentage fee taken into account in the \ndaily calculation of unit prices. \nInvestment fees and costs \n2 \nOption % of options assets* \nFund1 0.12%\n",
"---Example End---",
"According to example, \"My Super\" is with \"Administration fees and costs \n$26.00 p.a. \nplus \n0.17% p.a. of account balance (subject to a maximum of $1,000 p.a.) \n$0.50 per week deducted from your account balance at the end of each month or on exit.\"",
"so administration_fees is 0.17, total_annual_dollar_based_charges is 0.50 * 52 = 26, with production name: \"My Super\".",
"\"Fund1\" is with specific fund/ share name, so management_fee_and_costs and management_fee are: 0.12",
"The output should be:",
"{\"data\": [{\"fund name\": \"My Super\", \"share name\": \"My Super\", \"administration_fees\": 0.17, \"total_annual_dollar_based_charges\": 26}, {\"fund name\": \"Fund1\", \"share name\": \"Fund1\", \"management_fee_and_costs\": 0.12, \"management_fee\": 0.12}]}"
],
"total_annual_dollar_based_charges": [
"### Total annual dollar-based charges",
"Total annual dollar-based charges are share class level data.",
"A. Its value corresponds to the administration fees and costs that are charged on a weekly basis.",
"----Example Start----",
@ -357,18 +424,27 @@
"{\"data\": [{\"fund name\": \"MLC MasterKey Super & Pension Fundamentals\", \"share name\": \"MLC MasterKey Super & Pension Fundamentals\", \"total_annual_dollar_based_charges\": 78}, {\"fund name\": \"MLC Horizon 4 Balanced Portfolio\", \"share name\": \"MLC Horizon 4 Balanced Portfolio\", \"management_fee_and_costs\": 1.2, \"management_fee\": 1.2, \"buy_spread\": 0.1, \"sell_spread\": 0.1}]}",
"\n",
"B. Please identify some case which not belong to the total_annual_dollar_based_charges, and output empty.",
"----Example Start----",
"----Example 1 Start----",
"Cost of product information \n\nCost of product for 1 year \n\nThe cost of product gives a summary calculation about \nhow ongoing annual fees and costs can affect your \nsuperannuation investment over a 1-year period for all \ninvestment options. It is calculated in the manner \nshown in the 'Example of annual fees and costs'. \n\nThe cost of product information assumes a balance of \n$50,000 at the beginning of the year. (Additional fees \nsuch as a buy/sell spread may apply refer to the Fees \nand costs summary table for the relevant investment \noption.) \n\nYou should use this figure to help compare \nsuperannuation products and investment options. \n\nInvestment option \nCash \nCost of product \nPerpetual Cash \n$60.00 \nFixed income and credit \nBentham Global Income \n$485.00 \n",
"----Example End----",
"----Example 1 End----",
"Explanation:",
"The values provided in the example are not total annual dollar-based charges; ",
"they represent the cost of product information, which is a calculated figure used to compare superannuation products and investment options. ",
"This figure includes ongoing annual fees and costs, but it may not encompass all possible charges, such as additional fees like buy/sell spreads. ",
"Therefore, it serves as a comparative tool rather than a comprehensive total of all annual charges.",
"The output should be empty:",
"{\"data\": []}"
"{\"data\": []}",
"----Example 2 Start----",
"Equals \nCost of product \n1 \nIf your balance was $50,000 at \nthe beginning of the year, then \nfor that year you will be charged \nfees and costs of $395 for the \nsuperannuation product. \n\n",
"----Example 2 End----",
"Explanation:",
"The values provided in the example are not total annual dollar-based charges; ",
"they represent the cost of product information, which is a calculated figure used to compare superannuation products and investment options. ",
"FOUND \"Cost of product\", IGNORE ALL OF INFORMATION BELOW IT!!!"
],
"buy_spread": [
"### Buy/sell spread",
"Buy/sell spread is share class level data.",
"A. Exclude reported name",
"Please don't extract data by the reported names for buy_spread or sell_spread, they are: ",
"Transaction costs buy/sell spread recovery, Transaction costs reducing return of the investment option (net transaction costs), Cost of product, ",
@ -416,6 +492,7 @@
"{\"data\": [{\"fund name\": \"Allan Gray Australian Equity Fund Class A\", \"share name\": \"Allan Gray Australian Equity Fund Class A\", \"buy_spread\": 0.4, \"sell_spread\": 0.4}, {\"fund name\": \"Alphinity Sustainable Share Fund\", \"share name\": \"Alphinity Sustainable Share Fund\", \"buy_spread\": 0.4, \"sell_spread\": 0.4}]}"
],
"performance_fee_costs": [
"### Performance fees",
"Performance fees is share class level data.",
"A. If the performance fees is with the range, please ignore and output empty.",
"---Example Start---",
@ -436,7 +513,7 @@
"a. For this example, there is pure \"Performance fees\", please extract relevant values as performance_fee_costs.",
"b. This example mentioned share classes, please output according to share class.",
"The output should be",
"{\"data\": [{\"fund name\": \"Platinum International Fund\", \"share name\": \"C Class\", \"performance_fee_costs\": 0}, {\"fund name\": \"Platinum International Fund\", \"share name\": \"E Class\", \"performance_fee_costs\": 0}, {\"fund name\": \"Platinum International Fund\", \"share name\": \"P Class\", \"performance_fee_costs\": 0.15}, {\"fund name\": \"Platinum Global Fund (Long Only)\", \"share name\": \"C Class\", \"performance_fee_costs\": 0}, {\"fund name\": \"Platinum Global Fund (Long Only)\", \"share name\": \"E Class\", \"performance_fee_costs\": 0}, {\"fund name\": \"Platinum Global Fund (Long Only)\", \"share name\": \"P Class\", \"performance_fee_costs\": 0.24}]}",
"{\"data\": [{\"fund name\": \"Platinum International Fund\", \"share name\": \"P Class\", \"performance_fee_costs\": 0.15}, {\"fund name\": \"Platinum Global Fund (Long Only)\", \"share name\": \"P Class\", \"performance_fee_costs\": 0.24}]}",
"D. Identify the value of performance fee and if it is written 0% or 0.00% or 0 or 0.00 then extract the same as 0 do not assume null for the same and return its values as 0",
"---Example Start---",
"Fund/Investment Option \nManagement Fees \nand Costs \n(% pa) \n1 \nPerformance Fees 2 \n(% pa) \nTransaction Costs 3 \n(% pa) \nBT American Share Fund 1.08 0.00 0.00\nBT Asian Share Fund 1.10 0.00 0.10",
@ -454,6 +531,7 @@
"a. For this example, you have Example keyword in the header so you should not extract any datapoint values Like performance_fee_costs, management fee etc."
],
"minimum_initial_investment": [
"### Minimum initial investment",
"Minimum initial investment is fund level data, belong to integer number, the value examples are 100, 1,000, 5,000, 10,000, etc.",
"---Example 1 Start---",
"The minimum investment per Pension Plan account is \n$20,000. The minimum initial investment in any \ninvestment option is $5,000.\n\nPerpetual WealthFocus Pension Plan",
@ -488,6 +566,7 @@
"{\"data\": [{\"fund name\": \"Lifeplan Investment Bond\", \"minimum_initial_investment\": 1000}]}"
],
"benchmark_name": [
"### Benchmark name",
"Benchmark is fund leval data, usually as index fund name, e.g. S&P/ASX 300 A-REIT Total Return Index ",
"Sometime, there are multiple benchmark names with weightings in the context, please extract them all including weightings and benchmark names.",
"A. Examples for single benchmark name",
@ -605,7 +684,10 @@
"management_fee_and_costs": [
{
"keywords": ["Administration fees \nEstimated administration costs \nInvestment fees"],
"prompts": ["Complex management fee and costs rule:",
"keywords_is_regex": false,
"sub_datapoints": ["administration_fees", "performance_fee_costs"],
"prompts": [
"### Complex management fee and costs rule",
"If the table with columns:",
"\"Administration fees\", \"Investment fees\" ,\"Estimated other investment costs\" and \"Estimated performance fees\"",
"The administration_fees is \"Administration fees\"",
@ -626,7 +708,10 @@
},
{
"keywords": ["Entry Fee option \nNil Entry option"],
"prompts": ["Complex management fee and costs rule:",
"keywords_is_regex": false,
"sub_datapoints": ["performance_fee_costs"],
"prompts": [
"### Complex management fee and costs rule",
"If the table with columns:",
"\"Entry Fee option\", \"Nil Entry option\", \"Estimated Other investment costs\", \"Estimated Performance fees\"",
"The performance_fee_costs is \"Estimated Performance fees\"",
@ -637,21 +722,36 @@
"---Example 1 Start---",
"\nInvestment fund \nEntry Fee option \nNil Entry option \nEstimated Other investment costs \nEstimated Performance fees \nOther 1 \nOther 2 \nOther 3 \nOnePath International Shares \nIndex (Hedged) \n0.47 1.32 0.00 0.00 0.00 0.47 1.32\nPendal Concentrated Global \nShares Hedged II \n1.44 2.29 0.00 0.00 0.04 1.48 2.33\nPlatinum Asia** \n2.14 2.99 0.02 0.00 0.21 2.37 3.22\n",
"---Example 1 End---",
"The data points numbers order in data row (for example: 2.14 2.99 0.02 0.00 0.21 2.37 3.22) is correct as initial table structure.",
"Please pay attention below information",
"Assume the numeric column sequence number is from 1.",
"\"Entry Fee option\" values are as the column 1 numbers, \"Nil Entry option\" values are as the column 2 numbers, \"Estimated other investment costs\" values are as the column 3 numbers, \"Estimated Performance fees\" values are as the column 4 numbers.",
"For main fund: Platinum Asia with values: 2.14 2.99 0.02 0.00 0.21 2.37 3.22, ",
"the fund: Platinum Asia Entry Fee, both of management_fee and management_fee_and_costs should be 2.16 = 2.14 (the column 1 number) + 0.02 (the column 3 number), performance_fee_costs is 0 (the column 4 number)",
"the fund: Platinum Asia Nil Entry, both of management_fee and management_fee_and_costs should be 3.01 = 2.99 (the column 2 number) + 0.02 (the column 3 number), performance_fee_costs is 0 (the column 4 number)",
"Assume the numeric column sequence is from 1.",
"\"Entry Fee option\" values are as the 1st column values, \"Nil Entry option\" values are as the 2nd column values, \"Estimated other investment costs\" values are as the 3rd column values, \"Estimated Performance fees\" values are as the 4th column values.",
"Here is the example to get data, step by step.",
"For this fund in Example:",
"Platinum Asia** \n2.14 2.99 0.02 0.00 0.21 2.37 3.22\n",
"Step 1 Get new fund name",
"Combine \"Platinum Asia\" with \"Entry Fee\" as \"Platinum Asia Entry Fee\"",
"Combine \"Platinum Asia\" with \"Nil Entry\" as \"Platinum Asia Nil Entry\"",
"Step 2 **EXCLUE the values of the last three columns of data.**",
"ONLY KEEP these 4 values: 2.14 2.99 0.02 0.00 for next steps",
"Step 3 Calculate management_fee and management_fee_and_costs for these 2 new funds:",
"the fund: Platinum Asia Entry Fee, both of management_fee and management_fee_and_costs should be 2.16 = 2.14 (Value of 1st column) + 0.02 (Value of 3rd column)",
"the fund: Platinum Asia Nil Entry, both of management_fee and management_fee_and_costs should be 3.01 = 2.99 (Value of 2nd column) + 0.02 (Value of 3rd column)",
"**Make sure don't take \"Estimated other investment costs\" value from the wrong column!!!**",
"Step 4 Get performance_fee_costs",
"the fund: Platinum Asia Entry Fee, performance_fee_costs is 0 (Value of 4th column)",
"the fund: Platinum Asia Nil Entry, performance_fee_costs is 0 (Value of 4th column)",
"Identify the value of the column \"Estimated Performance fees\" and if it is written 0.00 then extract the same as 0 do not assume nil for the same and return its values as 0",
"**Make sure don't take \"Estimated Performance fees\" value from the wrong column!!!**",
"Please ignore the last fund name of previous PDF page, and extract data as these 4 steps for all of records in Context.",
"Therefore, the output should be:",
"{\"data\": [{\"fund name\": \"OnePath International Shares Index (Hedged) Entry Fee\", \"share name\": \"OnePath International Shares Index (Hedged) Entry Fee\", \"management_fee_and_costs\": 0.47, \"management_fee\": 0.47, \"performance_fee_costs\": 0},{\"fund name\": \"OnePath International Shares Index (Hedged) Nil Entry\", \"share name\": \"OnePath International Shares Index (Hedged) Nil Entry\", \"management_fee_and_costs\": 1.32, \"management_fee\": 1.32, \"performance_fee_costs\": 0}, {\"fund name\": \"Pendal Concentrated Global Shares Hedged II Entry Fee\", \"share name\": \"Pendal Concentrated Global Shares Hedged II Entry Fee\", \"management_fee_and_costs\": 1.44, \"management_fee\": 1.44, \"performance_fee_costs\": 0}]}, {\"fund name\": \"Pendal Concentrated Global Shares Hedged II Nil Entry\", \"share name\": \"Pendal Concentrated Global Shares Hedged II Nil Entry\", \"management_fee_and_costs\": 2.29, \"management_fee\": 2.29, \"performance_fee_costs\": 0}]}, {\"fund name\": \"Platinum Asia Entry Fee\", \"share name\": \"Platinum Asia Entry Fee\", \"management_fee_and_costs\": 2.16, \"management_fee\": 2.16, \"performance_fee_costs\": 0}, {\"fund name\": \"Platinum Asia Nil Entry\", \"share name\": \"Platinum Asia Nil Entry\", \"management_fee_and_costs\": 3.01, \"management_fee\": 3.01, \"performance_fee_costs\": 0}"
]
},
{
"keywords": ["Retirement and TTR income streams"],
"prompts": ["Complex management fee and costs rule:",
"keywords_is_regex": false,
"prompts": [
"### Complex management fee and costs rule",
"For management_fee_and_costs, ",
"a. If the title is \"Retirement and TTR income streams\"",
"it means each investment name is with two fund names, one is for Retirement as pension, another is for TTR.",
@ -672,7 +772,10 @@
},
{
"keywords": ["Recoverable expenses \nEstimated other indirect costs"],
"prompts": ["Complex management fee and costs rule:",
"keywords_is_regex": false,
"sub_datapoints": ["performance_fee_costs", "interposed_vehicle_performance_fee_cost", "buy_spread", "sell_spread"],
"prompts": [
"### Complex management fee and costs rule",
"If the table with columns:",
"\"Management fee (% pa)\", \"Recoverable expenses\", \"Estimated other indirect costs\", \"Peformance fees charged to the Investment Option by underlying managers\", \"Performance fees charged by interposed vehicles\", \"Buy/sell spreads\"",
"The management_fee is \"Management fee (% pa)\".",
@ -714,8 +817,10 @@
},
{
"keywords":["Plus other investment fees and costs \nEquals investment fees and costs"],
"keywords_is_regex": false,
"sub_datapoints": ["performance_fee_costs", "buy_spread", "sell_spread"],
"prompts": [
"Complex management fee and costs rule:",
"### Complex management fee and costs rule",
"If the table with columns:",
"\"Performance fee\", \"Plus other investment fees and costs\", \"Equals investment fees and costs\", \"Transaction costs(net)\", \"Buy-sell spreads\", \"Transaction costs(gross)\".",
"Both of the management_fee and management_fee_costs are \"Plus other investment fees and costs\".",
@ -730,6 +835,52 @@
"The output should be:",
"{\"data\": [{\"fund name\": \"MLC Inflation Plus Conservative Portfolio\", \"share name\": \"Super & Pension pre-retirement phase\", \"performance_fee_costs\": 0.18, \"management_fee_and_costs\": 0.77, \"management_fee\": 0.77, \"buy_spread\": 0.1, \"sell_spread\": 0.1}, {\"fund name\": \"MLC Inflation Plus Conservative Portfolio\", \"share name\": \"Retirement Phase\", \"performance_fee_costs\": 0.18, \"management_fee_and_costs\": 0.77, \"management_fee\": 0.77, \"buy_spread\": 0.1, \"sell_spread\": 0.1}]}"
]
},
{
"keywords":["Total\\s*administration\\s*and (management|investment)\\s*fees[\\s\\S]*?Administration\\s*fees[\\s\\S]*?(Management|Investment)\\s*fees[\\s\\S]*?Performance\\s*fee[\\s\\S]*?Buy\\/[sS]ell\\s*spread"],
"keywords_is_regex": true,
"sub_datapoints": ["administration_fees", "performance_fee_costs", "buy_spread", "sell_spread"],
"prompts": [
"### Complex management fee and costs rule",
"---Example Start---",
"Option name \nTotal administration\nand investment\nfees and costs (p.a.)\n= \nAdministration\nfees and\ncosts (p.a.)\n+ \nInvestment fees \nand costs (p.a.) \n2 \n+ \nPerformance \nfee (p.a.) \n1 \nBuy/sell\nspread\n(%)\n6 \nCFS Multi-Manager Multi-Sector (These investment options are located in the Investment Options Menu.) \nCFS Defensive \n0.94% \n0.20% 0.74%0.15 \nCFS Conservative 1.04% \n1 \n0.20% 0.81% 0.03%\n1 \n0.15 \n",
"---Example End---",
"For this table, there are \"Administration fees and costs (p.a.)\" as administration_fees, ",
"\"Investment fees and costs (p.a.)\" as management_fee_and_costs and management_fee, ",
"\"Performance fee (p.a.)\" as performance_fee_costs, ",
"\"Buy/sell spread (%)\" as buy_spread and sell_spread.",
"If one row has 5 decimal numbers, ",
"the 2nd decimal number is the administration_fees, ",
"the 3rd decimal number is the management_fee_and_costs and management_fee, ",
"the 4th decimal number is the performance_fee_costs, ",
"the 5th decimal number is the buy_spread and sell_spread.",
"If one row has 4 decimal numbers, ",
"the 2nd decimal number is the administration_fees, ",
"the 3rd decimal number is the management_fee_and_costs and management_fee, ",
"the 4th decimal number is the buy_spread and sell_spread.",
"\"Buy/sell spread\" is always as the last decimal value column, for buy_spread and sell_spread, please extract all of them.",
"Please always ignore the 1st decimal number, we need not the total sum values.",
"The output should be:",
"{\"data\": [{\"fund name\": \"CFS Multi-Manager Multi-Sector\", \"share name\": \"CFS Defensive\", \"management_fee_and_costs\": 0.74, \"management_fee\": 0.74, \"administration_fees\": 0.2, \"buy_spread\": 0.15, \"sell_spread\": 0.15}, {\"fund name\": \"CFS Multi-Manager Multi-Sector\", \"share name\": \"CFS Conservative\", \"management_fee_and_costs\": 0.81, \"management_fee\": 0.81, \"administration_fees\": 0.20, \"performance_fee_costs\": 0.03, \"buy_spread\": 0.15, \"sell_spread\": 0.15}]}"
]
},
{
"keywords":["Total\\s*of\\s*(management|investment)\\s*fees\\s*and\\s*costs\\s*and\\s*performance\\s*fees[\\s\\S]*?(Management|Investment)\\s*fees[\\s\\S]*?Performance\\s*fee[\\s\\S]*?Buy\\/[sS]ell\\s*spread"],
"keywords_is_regex": true,
"sub_datapoints": ["performance_fee_costs", "buy_spread", "sell_spread"],
"prompts": [
"### Complex management fee and costs rule",
"---Example Start---",
"Fund name \nTotal of management \nfees and costs and \nperformance \nfees (% p.a.) \n= \nManagement \nfees and costs \n(% p.a.) \n+ \nPerformance \nfee (% p.a.) \nBuy/sell \nspread \nCFS Real Return Class A 1 \n0.87% \n0.87% \n0.15% \nCFS Defensive Builder \n0.68% \n0.67% \n0.01% \n0.15% \n",
"---Example End---",
"The column: \"Total of management fees and costs and performance fees (% p.a.)\", meaning the value is the sum of \"Management fee and costs\" and \"performance fee\", We should ignore this column values.",
"The column \"Management fees and costs (% p.a.)\" is the value of \"Management fee and costs\".",
"Both of management_fee and management_fee_and_costs are the values for \"Management fees and costs (% p.a.)\" for this case.",
"If there are 3 decimal numbers, the 2nd decimal number is the management_fee_and_costs and management_fee, the 3rd decimal number is the buy_spread and sell_spread.",
"If there are 4 decimal numbers, the 2nd decimal number is the management_fee_and_costs and management_fee, the 3rd decimal number is the performance_fee_costs, the 4th decimal number is buy_spread and sell_spread.",
"So the output should be:",
"{\"data\": [{\"fund name\": \"CFS Real Return Class A\", \"share name\": \"CFS Real Return Class A\", \"management_fee_and_costs\": 0.87, \"management_fee\": 0.87, \"buy_spread\": 0.15, \"sell_spread\": 0.15}, {\"fund name\": \"CFS Defensive Builder\", \"share name\": \"CFS Defensive Builder\", \"management_fee_and_costs\": 0.67, \"management_fee\": 0.67, \"performance_fee_costs\": 0.01, \"buy_spread\": 0.15, \"sell_spread\": 0.15}]}"
]
}
]
}
@ -782,19 +933,12 @@
},
"output_requirement": {
"common": [
"If possible, please extract fund name, share name, data points values as the output.",
"If find fund name, and exist sub fund name, please output fund name + sub fund name, e.g. fund name is \"Black Rock European\", sub fund name is \"Growth\", the output fund name should be: \"Black Rock European Growth\".",
"Only output the data point which with relevant value.",
"Don't ignore the data point which with negative value, e.g. -0.12, -1.13",
"Don't ignore the data point which with explicit zero value, e.g. 0, 0.00",
"Don't extract data which values are -, *, **, N/A, N/A%, N/A %, NONE, it means the value should be NULL, please skip them.",
"Please also output the data point reported name in context.",
"Example:",
"---Example Start---",
"\n Investment option \nInvestment option \nmanagement \ncosts1 \n% p.a. \n(A)\nLifeplan \nadministration fee \n(gross)2 \n% p.a. \n(B)\nLifeplan \nadministration fee \n(net) \n% p.a. \n(C)\nTotal Management \nfees and costs \n(gross) \n% p.a. \n(A + B)\nTotal Management \nfees and costs \n(net) \n% p.a. \n(A + C)\nAllan Gray Australian Equity Fund \u2013 Class A\n0.77\n0.60\n0.42\n1.37\n1.19\nAlphinity Sustainable Share Fund\n0.95\n0.60\n0.42\n1.55\n1.37\nAntipodes Global Fund\n1.20\n0.60\n0.42\n1.80\n1.62\n",
"---Example End---",
"Output:",
"{\"data\": [{\"fund name\": \"Allan Gray Australian Equity Fund\", \"share name\": \"Class A\", \"management_fee_and_costs\": 1.19, \"management_fee\": 0.77, \"administration_fees\": 0.42}, {\"fund name\": \"Alphinity Sustainable Share Fund\", \"share name\": \"Alphinity Sustainable Share Fund\", \"management_fee_and_costs\": 1.37, \"management_fee\": 0.95, \"administration_fees\": 0.42}, {\"fund name\": \"Antipodes Global Fund\", \"share name\": \"Antipodes Global Fund\", \"management_fee_and_costs\": 1.62, \"management_fee\": 1.20, \"administration_fees\": 0.42}]}",
"Fund level data: (\"fund name\" and \"datapoint_name\") and share level data: (\"fund name\", \"share name\", \"datapoint_name\") should be output separately.",
"The output should be JSON format, the format is like below example(s):"
],
@ -876,7 +1020,8 @@
},
"end": [
"Only output JSON data.",
"Don't output the value which not exist in context.",
"Please re-check before output answer, DO NOT output the data point and value which not exist in context.",
"DO NOT use the example values from a representative fund (such as Balanced Growth) for other funds unless explicitly mentioned",
"If can't find fund name or share class name in context, please output empty JSON data: {\"data\": []}"
]
}

17
main.py
View File

@ -453,7 +453,6 @@ def batch_start_job(
pdf_folder: str = "/data/emea_ar/pdf/",
output_pdf_text_folder: str = r"/data/emea_ar/output/pdf_text/",
doc_data_excel_file: str = None,
document_mapping_file: str = None,
output_extract_data_child_folder: str = r"/data/emea_ar/output/extract_data/docs/",
output_mapping_child_folder: str = r"/data/emea_ar/output/mapping_data/docs/",
output_extract_data_total_folder: str = r"/data/emea_ar/output/extract_data/total/",
@ -1051,7 +1050,6 @@ def batch_run_documents(
doc_source: str = "emea_ar",
special_doc_id_list: list = None,
pdf_folder: str = r"/data/emea_ar/pdf/",
document_mapping_file: str = None,
output_pdf_text_folder: str = r"/data/emea_ar/output/pdf_text/",
output_extract_data_child_folder: str = r"/data/emea_ar/output/extract_data/docs/",
output_extract_data_total_folder: str = r"/data/emea_ar/output/extract_data/total/",
@ -1090,7 +1088,6 @@ def batch_run_documents(
pdf_folder,
output_pdf_text_folder,
page_filter_ground_truth_file,
document_mapping_file,
output_extract_data_child_folder,
output_mapping_child_folder,
output_extract_data_total_folder,
@ -1110,7 +1107,6 @@ def batch_run_documents(
pdf_folder,
output_pdf_text_folder,
page_filter_ground_truth_file,
document_mapping_file,
output_extract_data_child_folder,
output_mapping_child_folder,
output_extract_data_total_folder,
@ -1452,7 +1448,7 @@ def get_aus_prospectus_document_category():
def test_post_adjust_extract_data():
doc_id = "397107472"
doc_id = "448576924"
pdf_folder: str = r"/data/aus_prospectus/pdf/"
output_pdf_text_folder: str = r"/data/aus_prospectus/output/pdf_text/"
output_extract_data_child_folder: str = (
@ -1532,13 +1528,17 @@ if __name__ == "__main__":
doc_source = "aus_prospectus"
# doc_source = "emea_ar"
if doc_source == "aus_prospectus":
# document_sample_file = (
# r"./sample_documents/aus_prospectus_verify_6_documents_sample.txt"
# )
document_sample_file = (
r"./sample_documents/aus_prospectus_46_documents_sample.txt"
)
logger.info(f"Start to run document sample file: {document_sample_file}")
with open(document_sample_file, "r", encoding="utf-8") as f:
special_doc_id_list = [doc_id.strip() for doc_id in f.readlines()]
document_mapping_file = r"/data/aus_prospectus/basic_information/46_documents/aus_prospectus_46_documents_mapping.xlsx"
# special_doc_id_list = ["441280757"]
special_doc_id_list = [doc_id.strip() for doc_id in f.readlines()
if len(doc_id.strip()) > 0]
# special_doc_id_list = ["448576924"]
pdf_folder: str = r"/data/aus_prospectus/pdf/"
output_pdf_text_folder: str = r"/data/aus_prospectus/output/pdf_text/"
output_extract_data_child_folder: str = (
@ -1559,7 +1559,6 @@ if __name__ == "__main__":
doc_source=doc_source,
special_doc_id_list=special_doc_id_list,
pdf_folder=pdf_folder,
document_mapping_file=document_mapping_file,
output_pdf_text_folder=output_pdf_text_folder,
output_extract_data_child_folder=output_extract_data_child_folder,
output_extract_data_total_folder=output_extract_data_total_folder,

File diff suppressed because one or more lines are too long

View File

@ -1483,13 +1483,21 @@ def set_mapping_to_data_side_documents_data():
# mapping_sheet = "document_mapping"
# output_file_path = r"/data/aus_prospectus/output/ravi_100_documents/audited_file_phase2_with_mapping.xlsx"
data_file_path = r"/data/aus_prospectus/ground_truth/phase2_file/46_documents/46_documents_ground_truth.xlsx"
# data_file_path = r"/data/aus_prospectus/ground_truth/phase2_file/46_documents/46_documents_ground_truth.xlsx"
# data_sheet = "ground_truth"
# raw_name_column = "raw_share_name"
# mapping_file_path = r"/data/aus_prospectus/basic_information/46_documents/aus_prospectus_46_documents_mapping.xlsx"
# mapping_sheet = "document_mapping"
# raw_name_mapping_column = None
# output_file_path = r"/data/aus_prospectus/ground_truth/phase2_file/46_documents/46_documents_ground_truth_with_mapping.xlsx"
data_file_path = r"/data/aus_prospectus/ground_truth/phase2_file/next_round/next_round_6_documents_ground_truth.xlsx"
data_sheet = "ground_truth"
raw_name_column = "raw_share_name"
mapping_file_path = r"/data/aus_prospectus/basic_information/46_documents/aus_prospectus_46_documents_mapping.xlsx"
mapping_file_path = r"/data/aus_prospectus/basic_information/next_round/next_round_6_documents_mapping.xlsx"
mapping_sheet = "document_mapping"
raw_name_mapping_column = None
output_file_path = r"/data/aus_prospectus/ground_truth/phase2_file/46_documents/46_documents_ground_truth_with_mapping.xlsx"
output_file_path = r"/data/aus_prospectus/ground_truth/phase2_file/next_round/next_round_6_documents_ground_truth_with_mapping.xlsx"
set_mapping_to_raw_name_data(data_file_path=data_file_path,
data_sheet=data_sheet,
raw_name_column=raw_name_column,
@ -1582,8 +1590,7 @@ def set_mapping_to_raw_name_data(data_file_path: str = r"/data/aus_prospectus/ou
"administration_fees",
"minimum_initial_investment",
"benchmark_name",
"performance_fee",
"performance_fee_charged",
"performance_fee_costs",
"buy_spread",
"sell_spread",
"total_annual_dollar_based_charges",
@ -1593,9 +1600,7 @@ def set_mapping_to_raw_name_data(data_file_path: str = r"/data/aus_prospectus/ou
"withdrawal_fee",
"exit_fee",
"switching_fee",
"activity_fee",
"hurdle_rate",
"analyst_name"
"activity_fee"
]]
except Exception as e:
print(e)
@ -1733,7 +1738,7 @@ def update_data_by_latest_ground_truth():
if __name__ == "__main__":
update_data_by_latest_ground_truth()
# update_data_by_latest_ground_truth()
# set_provider_to_ground_truth(
# groud_truth_file=r"/data/aus_prospectus/ground_truth/phase2_file/46_documents/46_documents_ground_truth_with_mapping.xlsx",
# ground_truth_sheet="Sheet1",
@ -1741,7 +1746,7 @@ if __name__ == "__main__":
# document_mapping_sheet="document_mapping"
# )
# set_mapping_to_data_side_documents_data()
set_mapping_to_data_side_documents_data()
# source_file = r"/data/aus_prospectus/ground_truth/phase2_file/17_documents/audited_file_phase2_with_mapping.xlsx"
# target_file = r"/data/aus_prospectus/ground_truth/phase2_file/46_documents/46_documents_ground_truth_with_mapping.xlsx"

View File

@ -0,0 +1,3 @@
539999907
455235248
448576924

View File

@ -0,0 +1,6 @@
553449169
539791362
573372424
448906722
462780211
563608192