Overview

11 Building the qualitative engine with news analysis and LLMs

This chapter introduces a complementary qualitative engine designed to turn financial news into structured, auditable signals. It argues that markets are driven not only by prices and volumes, but also by narratives, policy shifts, and geopolitical developments that LLMs can help interpret when they are grounded in reliable retrieved context. The core idea is to use large language models as probabilistic research assistants, not as oracle-like fact engines, and to measure how market language evolves over time rather than merely summarizing it.

The chapter emphasizes a pragmatic workflow built around Retrieval-Augmented Generation. It shows how to gather news from multiple public sources with different strengths: a rich, recent feed, a specialized industry source, a headline-focused backfill source, and a deep historical archive. These sources are cleaned, unified, deduplicated, and enriched with metadata so the system can preserve traceability and support time-based filtering. The resulting text is then embedded into vector representations and stored in a vector database, creating a searchable knowledge base that balances current detail with historical breadth.

On top of this retrieval layer, the chapter builds an “LLM Analyst” that analyzes targeted news context and outputs structured JSON signals such as sentiment, supply risk, policy tone, conviction, and key events. A two-step retrieval strategy is used: one pass scans recent headlines for trend context, while a second pass focuses on the most recent content-rich articles for deeper assessment. The chapter closes by stressing that this is best viewed as a disciplined information-processing system whose outputs can later be fused with quantitative features, while noting the practical production concerns of stability, latency, cost, and fallback design.

The Qualitative Engine architecture: end-to-end pipeline from raw news to structured signals. Raw text from APIs and RSS feeds enters the RAG feature engineering pipeline (data cleaning, embedding, vector database storage). When a user query arrives, the system retrieves relevant documents and constructs a structured prompt for the LLM, which outputs quantifiable signals (sentiment, supply risk, policy tone) in JSON format.
Sample outputs from our four-source collection pipeline, showcasing the varying levels of content richness. Panels (NewsAPI) and (World Nuclear News) display content-rich records, providing both a title and a substantive description or summary field. These ~1,600 articles form the semantic core for our deep LLM analysis. In stark contrast, Panels (Google News RSS) and (GDELT) are content-sparse, offering title-only records. This heterogeneity is not a flaw, but a deliberate engineering choice that defines the "information-constrained environment" our subsequent processing must handle intelligently.
RAG pipeline verification results for the query "uranium supply disruption." The output demonstrates that the system correctly retrieves topically relevant articles about supply challenges and shortages, ranked by semantic similarity.
A sample JSON output from the LLM Analyst, demonstrating structured signal extraction. The model has synthesized multiple news snippets into a coherent, machine-readable assessment.

Summary

  • Qualitative signals extracted from news narratives reveal the why behind market behavior—context that quantitative data alone cannot capture.
  • General-purpose LLMs lack institutional context and premium data access, making RAG an essential foundation for grounding analysis in verifiable facts.
  • A multi-source pipeline blends public, freely accessible feeds: content-rich APIs (NewsAPI, WNN) for near-term context and headline-only archives (GDELT, Google RSS) for historical trends.
  • The RAG feature pipeline standardizes schemas, deduplicates overlapping feeds, embeds text into vectors, and stores them with metadata for transparent, auditable retrieval.
  • Because our news snippets are short, skipping chunking preserves context and reduces unnecessary complexity.
  • Structured prompt engineering defines a repeatable reasoning process—through explicit roles, boundaries, and JSON schema—to convert qualitative judgment into deterministic signals.
  • The “LLM Analyst” produces structured datasets of quantifiable features (Policy Tone, Supply Risk, Novelty), each with clear evidence and reasoning for full auditability.
  • The architecture is ensemble-ready, allowing multiple foundation models to act as independent analysts whose outputs can be aggregated for robustness.
  • These qualitative signals form a new feature class bridging language and alpha, setting the stage for Chapter 12’s hybrid integration with quantitative features.
  • Evals, guardrails, and human oversight lower these risks—they do not remove them.

FAQ

What is the main purpose of the qualitative engine in Chapter 11?The qualitative engine is designed to turn unstructured financial news into structured, quantifiable signals using LLMs and RAG. Its goal is to capture market narratives, tone shifts, policy changes, and emerging risks that numbers alone may miss.
Why does the chapter emphasize a retrieval-augmented generation (RAG) architecture?RAG is used to ground the LLM’s analysis in verifiable, authoritative sources instead of relying on the model’s memory alone. This improves traceability, reduces hallucinations, and makes the outputs more auditable.
What are the main limitations of using LLMs in investment research?LLMs are probabilistic rather than deterministic, so they can sound convincing while being wrong. They may struggle with exact numbers and dates, hallucinate facts, and even leak future knowledge from training data, which is why human oversight remains essential.
Why does the chapter treat the LLM as a “probabilistic analyst” instead of an oracle?The LLM is meant to assist with first-pass synthesis on uncertain, narrative-driven questions, not to replace human judgment. It helps read and organize large volumes of news so analysts can focus on interpretation and decision-making.
Why was uranium, specifically the URA ETF, chosen as the case study?Uranium is highly narrative-driven and sensitive to policy decisions, supply disruptions, and geopolitical developments. That makes it a strong fit for LLM-based qualitative analysis because news flow can meaningfully affect its price.
What sources are used to build the news ingestion pipeline?The chapter combines four sources: NewsAPI for recent rich content, World Nuclear News RSS for domain-specific summaries, Google News RSS for historical headline backfill, and GDELT for deep historical headline trends.
Why does the pipeline combine both content-rich and headline-only sources?Content-rich sources provide the semantic depth needed for LLM reasoning, while headline-only sources extend historical coverage and support trend analysis. Together, they create a broader and more useful information base than any single source could provide.
Why is data cleaning and unification such an important step before embedding?Different sources use different schemas, time formats, and content levels, so they must be standardized into one clean dataset. This improves retrieval accuracy, avoids duplicate stories, and makes the final knowledge base auditable and consistent.
What role do embeddings and the vector database play in the Qualitative Engine?Embeddings convert news text into vectors so semantically similar stories can be searched efficiently. The vector database stores these vectors along with metadata, enabling fast, time-aware, and traceable retrieval for the LLM.
What kinds of signals does the “LLM Analyst” produce?The LLM Analyst extracts structured signals such as sentiment_score, supply_risk, policy_tone, conviction, key_events, and reasoning. These outputs are formatted as JSON so they can be stored, audited, and later combined with quantitative features.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Financial AI in Practice ebook for free
choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • Financial AI in Practice ebook for free