liveBook · Manning

Chapter 11: Building the qualitative engine with news analysis and LLMs

What you will learn in chapter 11 of Financial AI in Practice

The introduction explains why financial news can complement market data and frames the proposed qualitative engine as a grounded research aid rather than an automated trader.

After this chapter you will be able to

What it builds on

Section by section

Introduction

The introduction explains why financial news can complement market data and frames the proposed qualitative engine as a grounded research aid rather than an automated trader.

Key terms: quantitative engine, qualitative events, narratives, qualitative engine, AI-powered research associate, Retrieval-Augmented Generation (RAG), velocity of attention, hybrid strategy

11.1 The new playbook: From market numbers to market narratives

This section frames LLMs as aids to investment judgment rather than replacements for it.

Key terms: LLMs, investment, judgment, limitations, strengths

11.1.1 The hard truth: A reality check on LLMs in investment research

This section explains why LLMs can help synthesize investment information but cannot be trusted as precise fact-retrieval tools or as proof of a predictive edge.

Key terms: Moravec’s paradox, probabilistic, deterministic, fact-checkers, hallucinate plausibly, human oversight, temporal leakage, RAG grounding, hypothesis, edge

11.1.2 Our philosophy: The LLM as a probabilistic analyst, not a deterministic oracle

This section positions the LLM as a first-pass analyst for news narratives and defines the qualitative engine that turns those narratives into probabilistic signals for human review.

Key terms: probabilistic analyst, first-pass analysis, human analyst, final arbiter of judgment, qualitative engine, quantitative engine, retrieval-augmented workflow, narrative signals, probabilistic signals

11.1.3 The strategist’s hunt for alpha: Where qualitative signals shine

The section explains how to choose narrative-driven assets for qualitative signals, using uranium as an example while emphasizing probabilistic interpretation and auditability.

Key terms: narratives, probabilistic events, qualitative signals, auditability, source text, reasoning process, URA, narrative-driven catalysts, probabilistic signal, language inflection

11.1.4 Designing the qualitative engine architecture

This section maps how financial news becomes a structured qualitative signal and explains why the LLM must be grounded in current, verifiable sources.

Key terms: qualitative signal pipeline, RAG feature engineering pipeline, vector embeddings, metadata, vector database, structured prompt template, RAG architecture, grounding, current, domain-specific data, verifiable sources

11.2 Implementing the news ingestion and processing pipeline

The section explains why a reliable news ingestion pipeline is the foundation of the qualitative engine.

Key terms: qualitative engine, data ingestion pipeline, structured, actionable signal

11.2.1 The data sourcing reality: Building our own information infrastructure

The section explains why market analysis needs curated information sources rather than relying on an LLM’s training alone, and why the book uses accessible public sources despite their limitations.

Key terms: foundation model, real signal, primary-source filings, institutional context, mini information infrastructure, premium, low-latency data feeds, publicly available APIs, news aggregators, information-constrained environment

11.2.2 Our pragmatic toolkit: A four-source blend

The section explains why the qualitative engine blends four imperfect free news sources, assigning each a role according to its content and historical reach.

Key terms: composite feed, multisource, multigranularity architecture, NewsAPI, World Nuclear News (WNN) RSS, daily signal generation, Google News RSS, GDELT, historical headlines backfill, headline trends

11.2.3 Implementing the fetcher functions

This section implements four complementary news fetchers that save standardized Parquet data and explains how their different content strengths and production update needs shape the qualitative engine.

Key terms: modular fetcher functions, standardized pandas DataFrame, Parquet, metadata, NewsAPI, WNN RSS, Google News RSS, GDELT, semantic fuel, news frequency

11.3 Building the RAG feature pipeline: From raw news to retrieval-ready vectors

This section explains why the qualitative engine turns news from disparate sources into searchable vectors that complement structured market data.

Key terms: RAG pipeline, qualitative signals, mathematical vectors, searchable knowledge base

11.3.1 Data unification and cleaning

This section turns four differently structured news files into one clean dataset ready for embedding and retrieval.

Key terms: Parquet files, golden source, specialized functions, concatenate, sort, deduplication, published_timestamp, Unix timestamps, metadata filtering, text_for_ embedding

11.3.2 Chunking strategy: Choosing the right granularity

This section explains why short news headlines and summaries should be embedded intact rather than split into smaller RAG chunks.

Key terms: chunking, granularity, natural chunks

11.3.3 Text embedding with OpenAI

This section explains how news snippets become searchable vectors and why consistent embeddings and batch API calls matter to the pipeline.

Key terms: embeddings, high-dimensional vector, semantic space, text-embedding-3-small, embedding stability, semantic drift, model version, batch processing, OpenAI API, vectors

11.3.4 Vector database storage with ChromaDB

This section explains why the news embeddings are stored in a searchable vector database and why their source text and metadata must be stored alongside them.

Key terms: ChromaDB, vector search, embeddings, semantically relevant articles, vectors, source texts, metadata, auditability

11.3.5 Verification: Trust, but verify the pipeline

A test query verifies that the RAG pipeline retrieves relevant articles while exposing a headline-only bias in its top results.

Key terms: RAG pipeline, test query, semantic search, verifiable context, headline-only articles, semantic similarity, content-rich sources, weighting factor, prompt level

11.4 Building the LLM Analyst: From retrieval to quantified signals

This section defines the news-derived signals the LLM Analyst should produce and frames the LLM as an evidence-grounded information extractor rather than a predictor.

Key terms: policy tone, supply shock risk, novelty, LLM Analyst, disciplined information extractor, structured assessment, RAG

11.4.1 Retrieval strategy: A two-step process for context and precision

The section designs a two-step news retrieval strategy that gives the LLM broad market context before supplying recent, substantive articles for signal extraction.

Key terms: Trend Scan, Deep Dive, dominant narratives, core signal extraction, where clause, server-side filtering, published_ts, has_content

11.4.2 Structured prompt engineering: The art of instructing an analyst

This section explains how a structured, evidence-bound prompt makes an LLM news analyst’s signals more repeatable, machine-readable, and auditable.

Key terms: prompt as a contract, quantitative analyst, Based ONLY on the context provided, two-step analysis, JSON schema, sentiment_score, supply_risk, policy_tone, conviction, key_events

11.4.3 The final output: A structured, auditable signal

This section shows how the LLM Analyst turns news into a structured, auditable qualitative signal and distinguishes that educational pipeline from a production system.

Key terms: JSON, sentiment_score, supply_risk, policy_tone, key_events, reasoning, dataset entry, numerical feature, audit trail, qualitative feature class

11.5 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 10: Building the quantitative engine: Market direction prediction with machine learning Chapter 12: Augmenting investment decisions: LLM-guided portfolio allocation →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.