I hope to extract the names of funds and indices from the text input by users, and ensure that the extracted names of funds and index match the full list of fund and index names to the greatest extent possible. However, I defined the enum values for each field in the properties within function_call, and found that the final extracted entity information still does not match the full list of enum information. What else I try or did I miss something?
I would greatly appreciate any guidance or suggestions on how to approach this problem effectively.
Here is the definition of tools I have used
{
"type": "function",
"function": {
"name": "information_extraction",
"description": "Extracts the relevant information from the passage.\n\n PROPERTY DESCRIPTION:\n - description: the description information of the entity.\n - enum: The enumeration values of the entity.\n ",
"parameters": {
"type": "object",
"properties": {
"info": {
"type": "array",
"items": {
"type": "object",
"properties": {
"etf_fund_name": {
"description": "ETF基金名称",
"enum": [
"中创400交易型开放式指数证券投资基金",
"战略新兴成指交易型开放式指数证券投资基金",
"广发中证全指可选消费交易型开放式指数证券",
"建信创业板交易型开放式指数证券投资基金",
"广发创业板交易型开放式指数证券投资基金",
"广发添利交易型货币市场基金",
"华泰柏瑞沪深300交易型开放式指数证券投",
"华安中证500低波ETF",
"深证红利交易型开放式指数证券投资基金",
"平安沪深300交易型开放式指数证券投资基"
],
"type": "string"
},
"index_name": {
"description": "指数名称",
"enum": [
"中小创业企业400指数",
"中国战略新兴产业成份指数",
"中证全指可选消费指数",
"创业板指数",
"创业板指数",
"活期存款利率(税后)",
"沪深300指数",
"上证180等权重指数",
"深证红利指数",
"沪深300指数"
],
"type": "string"
}
},
"required": []
}
}
},
"required": [
"info"
]
}
}
}
Here are some examples of the sentences I’m dealing with:
华安电子50ETF于2021年1月8日上市。基金简称华安中证电子50ETF,跟踪标的为中证电子50指数(931461.CSI,指数简称:电子50),基金经理为许之彦博士。
电子50指数未来两年成长性优秀,目前估值合理。2009年以来电子50指数累积上涨了432%,12年年化涨幅15%。2019年以来电子行业景气复苏,电子50指数上涨了111.5%,年化涨幅45%,未来仍是电子行业的快速增长期,相对2018年,成份股2022年预期净利润将累计增长207%。未来两年净利润复合增速31.6%,成长性优秀,基于2020年预期净利润的PE估值为50倍,基于2022年预期净利润的PE估值为29倍。
成份股定价显示1月7日电子50指数收盘价仍低于明年基本面价值。基于成份股定价,电子50指数2021和2022年预期基本面价值对应点位4748和6081点,2021年1月7日收盘于5326点,仅透支今年基本面及明年部分预期。2020年电子50指数波动于2020年和2022年基本面价值区间,没有过度透支未来基本面。
配置华安电子50ETF收益可观且相对安全。从预期收益率来看,透支完明年基本面仍可获得16%的收益,线性外推2023年基本面价值增长28%,透支完后年基本面可获得48%的收益,配置收益较为可观,业绩透支合理故配置安全性高。
I hope the result would be:
{"etf_fund_name":"华安中证500低波ETF","index_name":"中证电子50指数"}
but in fact the result is:
{
"etf_fund_name": "华安中证电子50ETF",
"index_name": "中证电子50指数"
}