← All work

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

A MarketVerse company feed sums up trades, events, ratings and fund holdings, each with a link to its filing or source.

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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

prices, filingsstoriespostsindex by sourcelink entitiespassagesrelationshipscontextfallbackcited answerquestionMarket data APIsPrices,…News searchStock news APIs andSerpAPISocial platformsX, Reddit andStockTwitsData pipelinesFastAPI, plusscheduled…SearchindexesAzure AI Search:news, social, 10-KKnowledgegraphNeo4j, built withLlamaIndexResearch chatRetrieves, answersand citesOpenAI GPT-4oWrites the answerfrom retrieved dataPerplexityWeb research only asa fallbackRetail investorReads the answer andits sources
Outside serviceBuilt by DaticsData storeAI modelPeopleAnswers come from data the platform has already collected, indexed and linked; the open web is searched only when that data falls short, and the chat shows the sources behind its answers.

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.

Live news flows into MarketVerse as a feed beside the watchlist.

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.

Agent Nova, the research agent, rates fundamental, technical, analyst and macro views and sets a MarketVerse price target.

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.

Macro trends show the fear and greed reading and market volatility over time.
04

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.

05

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

The markets heatmap sizes each stock by the change in trading volume and colors it by price change, beside the opportunities feed.
The markets heatmap sizes each stock by the change in trading volume and colors it by price change, beside the opportunities feed.

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

OpenAI GPT-4o

Cloud and infrastructure

Azure AI SearchAzure Functions

Apps and APIs

PythonFastAPI

Also in the stack

Neo4jLlamaIndexPerplexity API

How it shipped

  1. 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.

  2. 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.

  3. 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.

  4. 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.

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.

Book a 30-minute Product Review