RAG Workflow For Stock Earnings Report Analysis

RAG Workflow For Stock Earnings Report Analysis automates the analysis of Google's last three quarters of earnings reports, integrating tools like LangChain and Google Docs. It efficiently retrieves and synthesizes financial data, generating comprehensive reports that highlight trends, outliers, and key metrics. This streamlined process saves time and enhances decision-making for financial analysis.

7/8/2025
18 nodes
Complex
manualcomplexlangchainsplitinbatchesgoogledocsgooglesheetsgoogle drivesticky noteadvanced
Categories:
Complex WorkflowManual TriggeredData Processing & Analysis
Integrations:
LangChainSplitInBatchesGoogleDocsGoogleSheetsGoogle DriveSticky Note

Target Audience

Target Audience


- Financial Analysts: Professionals who need to analyze and report on quarterly earnings for companies like Google.
- Investors: Individuals or firms looking to make informed investment decisions based on financial performance.
- Data Scientists: Those interested in automating data retrieval and analysis processes for financial reports.
- Business Intelligence Teams: Teams focused on extracting insights from financial data to drive strategic decisions.
- Students and Researchers: Individuals studying finance or conducting research on corporate earnings and trends.

Problem Solved

Problem Solved


This workflow automates the process of retrieving, analyzing, and reporting on quarterly earnings for Google. It streamlines the following:
- Data Retrieval: Automatically fetches the latest earnings reports from Google Drive based on a list in Google Sheets.
- Data Processing: Uses embeddings and vector stores to efficiently analyze large amounts of financial data.
- Report Generation: Produces a structured financial report in Google Docs, highlighting trends, outliers, and key metrics, saving time and reducing manual effort.

Workflow Steps

Workflow Steps


1. Manual Trigger: The workflow starts when the user clicks ‘Test workflow’.
2. List of Files: It retrieves the list of Google Drive file URLs containing the latest earnings reports from a specified Google Sheets document.
3. Download Files: It downloads the relevant PDF earnings reports from Google Drive.
4. Data Loading: The downloaded PDF files are loaded into a vector store using the Default Data Loader.
5. Text Splitting: The content of the PDFs is split into manageable text chunks using a Recursive Character Text Splitter.
6. Embedding Creation: Embeddings are generated for the text chunks using Google Gemini.
7. Data Insertion: The embeddings are inserted into a Pinecone vector store for efficient retrieval.
8. AI Agent Interaction: The AI Agent processes user queries regarding Google’s financial performance, utilizing both the vector store and Google Docs tools to generate a report.
9. Report Saving: Finally, the generated report is saved to a specified Google Docs document.

Customization Guide

Customization Guide


- Google Sheets Configuration: Update the ‘List Of Files To Load’ node to point to your specific Google Sheet containing the file URLs.
- Google Drive File Management: Ensure that the PDFs are uploaded to Google Drive and that the URLs in your Google Sheet are correct.
- Pinecone Index: If you want to analyze a different company, create a new Pinecone index and adjust the ‘Pinecone Vector Store’ nodes accordingly.
- AI Agent Queries: Modify the query text in the AI Agent node to focus on different aspects of the financial reports or to analyze different companies.
- Google Docs Document: Change the document URL in the ‘Save Report to Google Docs’ node to save reports in a different Google Doc.