Chapter 16. NLP and LLM Foundations
Most financial information is created and shared as text: news headlines, regulatory filings, earnings call transcripts, research reports, social-media posts, and even internal chat logs. Natural-language processing (NLP) provides tools for turning this unstructured text into numerical representations that can feed into the models you developed in the previous chapter. Large language models (LLMs) extend these ideas with powerful pretrained transformers that can summarize, classify, and extract structure from text with relatively little task-specific code.
This chapter builds a practical bridge from raw text to numerical features, and from classical NLP pipelines to modern LLM workflows. You start with simple tokenization and bag-of-words models, move on to dense embeddings and linear classifiers, and then use pretrained transformers and LLMs as flexible building blocks for semantic search and extraction tasks. Throughout, the focus is on realistic but ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access