{"id":28826520,"url":"https://github.com/chankeypathak/rag-stock-assistant","last_synced_at":"2026-05-07T13:35:45.571Z","repository":{"id":298763486,"uuid":"1001029717","full_name":"chankeypathak/rag-stock-assistant","owner":"chankeypathak","description":"A real-time financial assistant that combines market data, news, and SEC filings using Retrieval-Augmented Generation (RAG). Built with Python, KDB.AI Cloud for vector search, and HuggingFace embeddings. Ideal for research, trading insights, or fintech prototyping.","archived":false,"fork":false,"pushed_at":"2025-06-12T19:29:42.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-12T20:54:46.127Z","etag":null,"topics":["ai","cloud","financial-analysis","genai","kdb","kdb-q","kdbq","kx","openai","python","q","rag","saas"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chankeypathak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-06-12T17:43:42.000Z","updated_at":"2025-06-12T19:29:45.000Z","dependencies_parsed_at":"2025-06-12T20:56:47.290Z","dependency_job_id":"5d5a1bae-790f-4ad4-9206-19a92aaad4e7","html_url":"https://github.com/chankeypathak/rag-stock-assistant","commit_stats":null,"previous_names":["chankeypathak/rag-stock-assistant"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chankeypathak/rag-stock-assistant","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chankeypathak%2Frag-stock-assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chankeypathak%2Frag-stock-assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chankeypathak%2Frag-stock-assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chankeypathak%2Frag-stock-assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chankeypathak","download_url":"https://codeload.github.com/chankeypathak/rag-stock-assistant/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chankeypathak%2Frag-stock-assistant/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260676937,"owners_count":23045115,"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":["ai","cloud","financial-analysis","genai","kdb","kdb-q","kdbq","kx","openai","python","q","rag","saas"],"created_at":"2025-06-19T03:04:53.801Z","updated_at":"2026-05-07T13:35:45.528Z","avatar_url":"https://github.com/chankeypathak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RAG-Based Stock Assistant\n\nThis project is a **Retrieval-Augmented Generation (RAG) stock assistant**, built using:\n- **Python CLI** interface\n- **KDB.AI Cloud** as the vector store\n- **HuggingFace embeddings**\n- **Real-time stock data sources**: yFinance, RSS, and SEC EDGAR filings\n\n\nThis project implements a Retrieval-Augmented Generation (RAG) pipeline tailored for financial use cases. It ingests real-time stock prices (via yFinance), market-moving news (via RSS), and company disclosures (via SEC EDGAR).\n\nThe documents are embedded using a HuggingFace transformer and stored in KDB.AI Cloud, a high-performance vector database. Queries from users are embedded, top-k relevant documents are retrieved, and responses are generated via an LLM.\n\nDesigned for easy replication with Docker, this assistant can support decision-making for investors, researchers, or algorithmic trading environments.\n\n---\n\n## Use case\n| Category                            | Example Queries                                                                                   |\n| ----------------------------------- | ------------------------------------------------------------------------------------------------- |\n| **Market Summaries**             | *\"Summarize today’s financial news.\"*\u003cbr\u003e*\"What happened in the stock market today?\"*             |\n| **Stock-specific News**          | *\"Any news about Reliance today?\"*\u003cbr\u003e*\"What's new with TCS stock?\"*                              |\n| **Sentiment or Trend Inference** | *\"Is the market sentiment bullish today?\"*\u003cbr\u003e*\"What's the tone of today's financial headlines?\"* |\n| **Keyword Searches**             | *\"Find documents mentioning interest rates.\"*\u003cbr\u003e*\"Which news mentions inflation?\"*               |\n| **Sector-based Questions**       | *\"What's going on in the IT sector?\"*\u003cbr\u003e*\"Any updates in the banking industry?\"*                 |\n\n---\n\n## Process\n\n1. Ingest stock prices, news, and SEC filings.\n2. Embed documents using a SentenceTransformer model.\n3. Store embeddings in **KDB.AI Cloud**.\n4. Accept a user query via CLI.\n5. Embed the query and retrieve top-k similar documents.\n6. Generate a natural-language answer using an LLM.\n\n---\n\n## Components Overview\n| Component            | Description                                               |\n| -------------------- | --------------------------------------------------------- |\n| `ingest.py`          | Fetch \u0026 preprocess news, stock data, filings              |\n| `embed.py`           | Generate embeddings using HuggingFace                     |\n| `query.py`           | Query KDB.AI and trigger LLM-based response               |\n| `docker-compose.yml` | Run CLI + processing modules in containers                |\n| `KDB.AI`             | Vector DB (SaaS) used for storing and querying embeddings |\n| `CLI Interface`      | User interacts with RAG system via terminal               |\n\n## TODO\n- Add Streamlit UI\n- Add alerts for stock anomalies\n- Key management in Docker","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchankeypathak%2Frag-stock-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchankeypathak%2Frag-stock-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchankeypathak%2Frag-stock-assistant/lists"}