I need help in generating reports using ChatGPT similar to given template structure

I have a requirement to generate excel reports for given data and formatted to a given structure.
Use Case: I have general ledger transactions data and I want to create a Balance Sheet similar to a template structure I provide it(i.e. another sample balance sheet). This should be done at the click of a button where the API will fetch the data to a xlsx and pick the template xlsx and send it to the OpenAI API with the prompt to generate it.
These templates can vary based on the user preference.
I tried ChatGPT 4.o with different prompts with the attached data sheet and template sheet. But it never generates the output I want. It’s always give me back the same template with the data in it or generate a trash report that’s nowhere close to the template.

Can you’ll please guide me on how I can get this to work.

Thank you!

I have an shared example of assistant that use CSV files, you can refactor instructions and add the template as example to your assistant and explain the parameters (if you want to use the functions, you have an open-source RAG in FlexiAI framework). Instructions Shared

You can see the RAG in action:

Thank you for attending the thread @razvan.i.savin . Yes FlexAI can be used to develop the application. However before going in that direction I wanted to test the capability of ChatGPT from the OpenAI UI Interface, and it did a poor job in analyzing the hierarchical structure of the excel template I gave. Because of that reason it was not able to generate a balance sheet for the given GL balance data that is compliant with the template structure. That is where I was stuck, wondering how to send a proper informative prompt to generate the balance sheet in correct structure.

1 Like