[Use-Case] Add Form Filling #79

Closed
opened 2026-02-15 19:15:43 -05:00 by yindo · 1 comment
Owner

Originally created by @marcusschiesser on GitHub (Oct 10, 2024).

Originally assigned to: @leehuwuj on GitHub.

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:

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
Originally created by @marcusschiesser on GitHub (Oct 10, 2024). Originally assigned to: @leehuwuj on GitHub. 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: ```python 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: ```python class QueryResult(BaseModel): """Financial parameters for a company for a specific year.""" net_income: float EPS: float EBITDA: float ```
yindo closed this issue 2026-02-15 19:15:43 -05:00
Author
Owner

@marcusschiesser commented on GitHub (Oct 16, 2024):

Note: here are some ideas concerning form filling: https://www.notion.so/llamaindex/General-Report-Generation-Scoping-117db4b7d41a8015a3f9d60aacbc81ae?pvs=4

@marcusschiesser commented on GitHub (Oct 16, 2024): Note: here are some ideas concerning form filling: https://www.notion.so/llamaindex/General-Report-Generation-Scoping-117db4b7d41a8015a3f9d60aacbc81ae?pvs=4
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/create-llama#79