Start with a feasibility test:
Instead of making one query for each financial parameter (as in the Jupyter notebook), we try to retrieve all financial parameters for a company for a specific year in one query and save the output in a pydantic model. This is testable with the current structured extraction template after connecting it to the provided LlamaCloud index form the notebook.
One query:
query = f"what are the financial parameters of {company} for the year {year}?. Don't be verbose. Provide 1-5 words answers for mathematical values. If you are unable to provide answer, output as NA"
Model:
class QueryResult(BaseModel):
"""Financial parameters for a company for a specific year."""
net_income: float
EPS: float
EBITDA: float
Change the structured extraction template to support this use case: https://github.com/run-llama/llamacloud-demo/blob/main/examples/form_filling/Form_Filling_10K_SEC.ipynb
Start with a feasibility test: Instead of making one query for each financial parameter (as in the Jupyter notebook), we try to retrieve all financial parameters for a company for a specific year in one query and save the output in a pydantic model. This is testable with the current structured extraction template after connecting it to the provided LlamaCloud index form the notebook.
One query:
Model: