A market-news analyst needs to assess a policy announcement posted minutes ago. A large language model (LLM) may reason about the announcement, but its training knowledge cannot include the new post. Retrieval-augmented generation (RAG) fetches relevant information from an external source and supplies it alongside the query, grounding the response in current, verifiable context rather than treating the model as a fact database. section 3.3.2 section 11.0
A practical RAG workflow has two connected paths: prepare information for search, then use it at query time.
- Ingest new or updated documents; parse and standardize them, remove duplicates where feeds overlap, and retain source and publication-date metadata. section 3.3.2 section 11.5
- Choose document boundaries that preserve useful context, embed the resulting text, and index its vectors for similarity search. Chunking needs judgment: very small pieces may match precisely while losing surrounding context. Short news snippets can instead remain intact. section 3.3.2 section 11.5
- Embed the query, retrieve relevant snippets, and place them in a structured prompt for the LLM. For market analysis, request machine-readable JSON signals that retain evidence and reasoning. section 11.1.4 section 11.5
Figure 11.1 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.
The end-to-end diagram follows news from APIs and RSS feeds through cleaning, embeddings, retrieval, prompting, and structured signals. section 11.1.4
News signals beside market data
A qualitative engine can retrieve news about central-bank policy or supply disruption and turn the supported narrative into policy-tone, supply-risk, or novelty features. Those features complement price- and volume-based signals; they are research inputs, not an automated trading decision. section 11.0 section 11.5
Retrieval does not guarantee truth. Outdated documents, poor indexing, or irrelevant matches can still produce wrong answers. In finance, keep ingestion current and retrieval auditable; fraud-investigation corpora also call for personal-information scrubbing, controlled access, and filtering by attributes such as date or source. Evals, guardrails, and human oversight reduce risk without removing it. section 3.1.3 section 7.4.3 section 11.5































