{"id":29222763,"url":"https://github.com/anshi312/financial-analyst-rag","last_synced_at":"2026-05-05T04:40:09.704Z","repository":{"id":302253918,"uuid":"1011718937","full_name":"anshi312/financial-analyst-rag","owner":"anshi312","description":"Financial QA assistant using RAG, FAISS, LangChain \u0026 HuggingFace to query 10-Ks \u0026 reports. PDF search, NLP, and Streamlit UI for insights.","archived":false,"fork":false,"pushed_at":"2025-07-01T11:06:32.000Z","size":7989,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-01T11:37:59.241Z","etag":null,"topics":["document-ai","faiss","financial-analysis","huggingface","langchain","nlp","pdf-processing","rag","semantic-search","sentence-transformers","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anshi312.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-01T08:38:15.000Z","updated_at":"2025-07-01T11:06:35.000Z","dependencies_parsed_at":"2025-07-01T11:38:03.108Z","dependency_job_id":"dbd75916-946f-43ee-a7f5-1949f31acef3","html_url":"https://github.com/anshi312/financial-analyst-rag","commit_stats":null,"previous_names":["anshi312/financial-analyst-rag"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/anshi312/financial-analyst-rag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anshi312%2Ffinancial-analyst-rag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anshi312%2Ffinancial-analyst-rag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anshi312%2Ffinancial-analyst-rag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anshi312%2Ffinancial-analyst-rag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anshi312","download_url":"https://codeload.github.com/anshi312/financial-analyst-rag/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anshi312%2Ffinancial-analyst-rag/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263256545,"owners_count":23438262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["document-ai","faiss","financial-analysis","huggingface","langchain","nlp","pdf-processing","rag","semantic-search","sentence-transformers","streamlit"],"created_at":"2025-07-03T04:02:09.888Z","updated_at":"2026-05-05T04:40:09.642Z","avatar_url":"https://github.com/anshi312.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Financial Analyst RAG Assistant\n\nA Retrieval-Augmented Generation (RAG) application for answering financial questions directly from corporate filings and reports using LangChain, FAISS, and HuggingFace Sentence Transformers.\n\n## Overview\n\nThis project enables analysts and users to query financial data from embedded company documents such as 10-Ks, earnings reports, and press releases. It utilizes state-of-the-art semantic search and a question-answering pipeline to extract relevant insights with high accuracy.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/demo-screenshot.png\" width=\"600\" alt=\"Demo Screenshot\"\u003e\n\u003c/p\u003e\n\n---\n\n## Architecture\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/arch-diagram.png\" width=\"400\" alt=\"Architecture\"\u003e\n\u003c/p\u003e\n\n---\n\n## Features\n\n- **PDF ingestion**: Supports uploading and embedding financial documents in PDF format\n- **Semantic retrieval**: Chunks and embeds documents using `all-MiniLM-L6-v2`\n- **Retrieval-Augmented Generation (RAG)**: Combines FAISS retrieval with local or OpenAI-powered QA\n- **Streamlit Interface**: Simple, user-friendly frontend\n- **Fast indexing**: Local FAISS vector store for efficient semantic search\n- **Optional OpenAI Integration**: Enhances responses with GPT-backed reasoning\n\n---\n\n## Setup Instructions\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/anshi312/financial-analyst-rag.git\ncd financial-analyst-rag\n```\n\n### 2. Create and Activate a Virtual Environment\n\n```bash\npython3 -m venv .venv\nsource .venv/bin/activate\npip install -r requirements.txt\n```\n\n### 3. Add Your Financial Documents\n\nPlace all relevant PDF files inside the `data/` directory.\n\n### 4. Generate Embeddings and Build FAISS Index\n\n```bash\npython embeddings/embed_store_faiss.py\n```\n\n### 5. Launch the Application\n\n```bash\npython app.py\n```\n\n---\n\n## Technologies Used\n\n- Python 3.10+\n- LangChain\n- FAISS\n- HuggingFace Sentence Transformers\n- PyMuPDF\n- Streamlit\n- OpenAI API (optional)\n\n---\n\n## Project Structure\n\n```\nfinancial-analyst-rag/\n├── app.py                    # Main application\n├── data/                     # Financial reports in PDF\n├── embeddings/               # Embedding logic and indexing\n│   ├── embed_store_faiss.py\n│   ├── text_processor.py\n│   ├── test_faiss_query.py\n│   └── test_text_processor.py\n├── rag/                      # RAG pipeline modules\n│   ├── rag_pipeline.py\n│   └── setup_rag.py\n├── scraping/                 # (Optional) Financial web scrapers\n│   ├── earnings_scraper.py\n│   ├── news_scraper.py\n│   ├── sec_scraper.py\n│   └── utils.py\n├── test_env.py               # Environment variable test\n├── test_hf_pipeline.py       # QA pipeline test\n├── requirements.txt          # Python dependencies\n├── instruct.txt              # Prompt/instruction templates\n├── .gitignore\n└── README.md\n```\n\n---\n\n## Example Queries\n\n- “What was Netflix’s total revenue in 2024?”\n- “Provide a breakdown of Apple’s net income by product line.”\n- “Compare Microsoft and Apple’s R\u0026D expenditure for the last fiscal year.”\n\n---\n\n## Security Notes\n\n- API keys are excluded via `.gitignore`.\n- Store API credentials securely in `config/.env`.\n\n**Example**:\n\n```\nOPENAI_API_KEY=your-key-here\n```\n\n**Do not** hardcode secrets directly into the source files.\n\n---\n\n## License\n\nThis project is licensed under the [MIT License](https://opensource.org/licenses/MIT).\n\n---\n\n## Author\n\n**Anshi Shah**  \nMS in Computer Engineering, NYU Tandon School of Engineering  \n📧 ans10020@nyu.edu  \n🔗 [LinkedIn](https://linkedin.com/in/shah-anshi)\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanshi312%2Ffinancial-analyst-rag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanshi312%2Ffinancial-analyst-rag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanshi312%2Ffinancial-analyst-rag/lists"}