Cosmic AI
Investors get answers that cite the filing, news story or post behind them
We built the data layer behind the chat in MarketVerse, Cosmic AI's retail investing app: live feeds indexed by source and linked in a knowledge graph. Answers come from that data first and cite the filing, story or post they used.
Financial ServicesCited market research assistantBuilt from zero
The challenge
What an investor needs is spread across filings, news sites, social platforms and data providers, and a model that answers without that context can only guess.
What we did
Pipelines for prices, filings, news, social posts and macro data, a search index per kind of source, a knowledge graph of market relationships, and web research only as a fallback.
The outcome
The app went live on Azure with chat answers that cite the filing, news story or post behind them, so investors can check what the AI said.
- Sources
- Prices, filings, news, social posts and macro data
- Retrieval
- A search index per source type, plus a knowledge graph
- Answers
- Cited, with web research only as a fallback
- Macro indicators
- 12, including the yield curve, VIX and GDP
The starting point
MarketVerse is Cosmic AI's market intelligence and trading app for retail investors. Its chat, dashboard and company pages answer questions about companies, sectors and the market, and we built the data they answer from.
What had to change
The information an investor needs is spread across filings, news sites, social platforms and data providers, while institutions have tools that bring it together. A model that answers without that context guesses, and an investor cannot check a guess.
What could not break
- Answers draw on the platform's own data before the open web
- The chat shows the sources behind its answers
- Options data stays in QA, out of production, because of its licensing
- QA and production run as separate environments, each with its own CI/CD
The calls we made
We treated citations as a data problem first: an agent can only cite what the platform has already collected, indexed and linked.
- 01
Platform data first, the open web second
The chat answers from the data the platform has collected, with GPT-4o writing the answer, and runs a web research step through Perplexity only when that data is not enough.
- 02
One index per kind of source
News, social posts and annual filings each got their own Azure AI Search index, so retrieval can pull from the right kind of source and the answer can name it.
- 03
A knowledge graph for context
Companies, news and market factors are linked in a Neo4j graph built with LlamaIndex, so an answer can explain how an event connects to a company or a holding.
- 04
Slower data on a schedule
Hedge fund holdings and other slower data arrive through scheduled Azure Functions jobs, so the chat reads data that is already collected when a question comes in.
- 05
Licensed data held back
Options activity stayed in the QA environment because of its licensing, and production answers did not use it.
How the system fits together
What we built
Live data pipelines
Feeds for prices and fundamentals, annual and quarterly filings, news, posts from X, Reddit and StockTwits, macro indicators, and hedge fund and congressional trades, with scheduled jobs for slower data.
Company intelligence
Company pages with fundamental, technical chart and analyst analysis, key takeaway summaries of reports and news, and stock prices mapped to the news around them.
Market dashboard
A daily snapshot of market mood, earnings and AI detected opportunities, twelve macro indicators and market heatmaps, with the snapshot also sent out as a daily newsletter.
Indexes and a knowledge graph
Separate Azure AI Search indexes for news, social posts and annual filings, and a Neo4j knowledge graph built with LlamaIndex that links companies, news and market factors and shows them to users as a visual map.
Chat with citations
GPT-4o answers from the retrieved passages and relationships and cites the filing, article or post it used, with a Perplexity research step when the platform's own data falls short. A later release added a panel that previews those sources inside the chat.
How it works
Collect
Pipelines and scheduled jobs pull prices, fundamentals, filings, news, social posts and macro data.
Index and link
Each kind of source lands in its own search index, and the knowledge graph links it to companies and market factors.
Retrieve
A question pulls the relevant passages and relationships from the platform's own data.
Fall back
When that data is not enough, a web research step through Perplexity fills the gap.
Answer with sources
GPT-4o writes the answer, and the chat cites the filing, article or post it used.
A closer look
What changed
MarketVerse went live on Azure with chat answers grounded in filings, news, social posts and market data, each citing the source behind it. Investors could check what the AI said instead of taking it on trust.
Under the hood
- Datics role
- Product built by Datics
- Retrieval
- Azure AI Search indexes for news, social posts and annual filings, a Neo4j knowledge graph built with LlamaIndex, and OpenAI GPT-4o for answers, with Perplexity as the fallback.
- Data sources
- Financial Modeling Prep, Yahoo Finance, Rapid APIs, SerpAPI and stock news APIs, plus posts from X, Reddit and StockTwits.
- Operations
- FastAPI services behind Gunicorn and Nginx on Azure VMs, with Azure Functions running the scheduled data jobs and separate QA and production pipelines.
- Licensing boundary
- Options activity data was held in the QA environment because of its licensing and kept out of production.
AI and models
Cloud and infrastructure
Apps and APIs
Also in the stack
How it shipped
Design and a research spike
Design came first, and an Azure AI Studio research spike with a demo came before the data APIs were built.
Data APIs and a cited chat
The first build added APIs for news, financials, annual filings, sentiment and the knowledge graph, search indexes for news, social posts and filings, and chat with citations.
Ready for load
Load testing and server tuning ran before launch, with QA and production on separate CI/CD pipelines for front end and back end.
More sources after launch
Macro trend graphs, price targets, hedge fund holdings and scheduled Azure Functions jobs came in later releases, while options data stayed in QA.
The venture's product team
We owned the data pipelines, retrieval and chat as the venture's product team, with product calls made in weekly syncs with the founder.
Separate QA and production
Every change reached a QA environment with its own CI/CD before production, and data not cleared for users, such as options activity, stayed there.
What this unlocked
The same data layer fed the dashboard's daily market snapshot and the daily newsletter. The B2B version we proposed for investment firms puts the agents built on it behind an authenticated API, inside the firm's own Azure subscription.
Related work
Have a product with the same kind of constraints?
Tell us what already exists and what you want it to do. We will tell you what it takes.
