How sureshpaulraj/financial-reasoning works
Project type and purpose
• This is a Python-based data-processing CLI/tool (also runnable as a Jupyter notebook) that ingests financial PDF reports, extracts and formats their text, sends that content to Azure OpenAI’s o3 reasoning model for analysis, and then generates both a plain-text and HTML financial report. It can also email the generated reports.
File structure
• Top-level files:
• .env – stores Azure OpenAI credentials
• requirements.txt – Python dependencies
• FinancialAnalysisFromPDF.ipynb – orchestration notebook / main driver
• pdfs/ – input folder for raw PDF files
• formatted_financial_report.txt & financial_report.html – output artifacts
• No separate src/ or service folders; the notebook/script encapsulates all pipeline stages.
• Key libraries shown in dependencies: PyPDF2, PyMuPDF, python-dotenv, openai (Azure), requests, tiktoken, pydantic.
README for additional insights
• Pipeline stages are clearly described:
1. PDF text extraction (page-by-page)
2. Markdown formatting
3. Azure OpenAI API call (o3 reasoning model)
4. Formatting and report generation (text + HTML)
5. Optional email distribution