1 option
Large Language Models in Finance : A Hands-On Guide to LLM Architectures, Agents, RAG, Governance, and Evaluation in Finance.
- Format:
- Book
- Author/Creator:
- Alonso, Miquel Noguer i.
- Language:
- English
- Physical Description:
- 1 online resource (554 pages)
- Edition:
- 1st ed.
- Place of Publication:
- Birmingham : Packt Publishing, Limited, 2026.
- Summary:
- Build production-grade Large Language Model systems for finance.Learn how to design, fine-tune, evaluate, govern, and deploy LLMs, Retrieval-Augmented Generation (RAG), and AI agents for trading, banking, risk management, compliance, and financial research using rigorous mathematics, practical code, and real-world case studies.
- Contents:
- Cover
- Title Page
- Copyright and Credits
- Contributors
- Table of Contents
- Preface
- Chapter 1: Introduction to Large Language Models
- 1.1 Running case study: Earnings call assistant
- 1.2 Why the book connects motivation, mathematics, code, and controls
- 1.3 Understanding language models
- 1.4 Statistical models vs. deep learning-based models
- 1.4.1 Statistical language models and their limitations
- 1.4.2 Deep learning models and the emergence of transformers
- 1.5 Pre-trained language models (e.g., GPT, BERT, T5)
- 1.5.1 GPT series
- 1.5.2 BERT and its derivatives
- 1.5.3 T5 and the text-to-text paradigm
- 1.6 Architecture and components
- 1.6.1 Multi-head self-attention
- 1.6.2 Positional encoding
- 1.6.3 Layer normalization and residual connections
- 1.6.4 Feedforward neural networks
- 1.7 Optimization objectives
- 1.8 Evolution of financial AI
- 1.8.1 Rule-based systems to neural networks
- 1.8.2 Emergence of domain-specific financial AI models
- 1.8.3 Current state of LLMs in finance
- 1.9 Understanding model types
- 1.9.1 Domain-specific models (BloombergGPT, FinBERT and FinEAS)
- 1.9.2 General-purpose architectures powering financial AI
- 1.9.3 Custom fine-tuned models
- 1.10 Financial reasoning in LLMs
- 1.10.1 Handling numerical data
- 1.10.2 Interpreting financial data
- 1.10.3 Decision-making in financial AI
- 1.10.4 Limitations and biases in financial AI
- 1.11 Case study wrap-up: Earnings call assistant
- 1.12 Summary
- 1.13 Open questions
- 1.14 Further reading
- Chapter 2: Foundations and System Design of Financial LLMs
- 2.1 Examining the Transformer architecture
- 2.1.1 Transformer layers
- 2.1.2 Optimizations for large-scale models
- 2.2 Tokenization and embeddings
- 2.2.1 Subword tokenization approaches
- 2.2.2 Financial tokenization considerations.
- 2.2.3 Embedding layers
- 2.2.4 Vocabulary considerations
- 2.3 Pre-training fundamentals
- 2.3.1 Pre-training objectives
- 2.3.2 Training corpus design
- 2.3.3 Transfer learning
- 2.3.4 Computational requirements
- 2.4 Understanding prompt engineering in finance
- 2.4.1 Prompt design
- 2.4.2 Reasoning-enhancement techniques
- 2.4.3 Domain-specific strategies
- 2.5 Retrieval-Augmented Generation in financial systems
- 2.6 How to build an LLM from scratch
- 2.6.1 Dataset preparation and tokenization
- 2.6.2 Training strategies for large-scale models
- 2.6.3 Scaling and infrastructure requirements
- 2.6.4 Completing the financial LLM pipeline
- 2.7 Summary
- Chapter 3: Fine-Tuning LLMs for Finance
- 3.1 Production-quality fine-tuning contract
- 3.2 Adapting general LLMs to financial tasks
- 3.2.1 The fine-tuning paradigm
- 3.2.2 Fine-tuning cookbook for common tasks
- 3.3 Foundations of fine-tuning
- 3.3.1 Transfer learning theory
- 3.3.2 Catastrophic forgetting and regularization
- 3.3.3 Sample efficiency and few-shot learning
- 3.4 Full fine-tuning methodology
- 3.4.1 Dataset preparation
- 3.4.2 Training configuration
- 3.4.3 Case study: Fine-tuning for financial sentiment analysis
- 3.5 Parameter-efficient fine-tuning
- 3.5.1 Motivation for PEFT
- 3.5.2 Low-Rank Adaptation (LoRA)
- 3.5.3 Quantized Low-Rank Adaptation (QLoRA)
- 3.5.4 Other PEFT Methods
- 3.5.5 Case study: QLoRA for earnings call sentiment
- 3.5.6 Choosing between full fine-tuning, LoRA, and QLoRA
- 3.6 Supervised fine-tuning
- 3.6.1 Instruction format for supervised fine-tuning
- 3.6.2 Named Entity Recognition (NER)
- 3.6.3 Financial question answering
- 3.6.4 Financial text summarization
- 3.7 Reinforcement Learning from Human Feedback (RLHF)
- 3.7.1 RLHF pipeline
- 3.7.2 Reward model training.
- 3.7.3 Policy optimization with Proximal Policy Optimization (PPO)
- 3.7.4 Direct Preference Optimization (DPO)
- 3.7.5 RLHF for financial applications
- 3.8 Evaluation and validation
- 3.8.1 Offline evaluation metrics
- 3.8.2 Financial-specific validation
- 3.8.3 Robustness testing
- 3.8.4 A/B testing in production
- 3.8.5 Finance-specific evaluation checklist
- 3.8.6 Model risk management and regulatory compliance
- 3.9 Case studies: How financial LLMs are actually built
- 3.9.1 BloombergGPT: Domain-specific pre-training and fine-tuning
- 3.9.2 FinBERT and the BERT fine-tuning lineage
- 3.9.3 FinQA: Numerical reasoning over financial data
- 3.9.4 What these case studies actually teach us
- 3.10 Audit-grade fine-tuning: From objective to runnable experiment
- 3.11 Summary
- Chapter 4: Retrieval-Augmented Generation for Financial Tasks
- 4.1 The knowledge problem in financial AI
- 4.2 RAG system architecture
- 4.3 Formal RAG framework
- 4.3.1 A production-grade mathematical contract for RAG
- 4.4 Embedding models
- 4.4.1 Dense embeddings
- 4.4.2 Contrastive learning for embeddings
- 4.4.3 Financial embedding models
- 4.4.4 Matryoshka embeddings
- 4.5 Vector databases and indexing
- 4.5.1 Approximate nearest neighbor search
- 4.5.2 Facebook AI Similarity Search (FAISS)
- 4.5.3 Hybrid search
- 4.6 Chunking strategies
- 4.6.1 The chunking problem
- 4.6.2 Fixed-size chunking
- 4.6.3 Recursive character splitting
- 4.6.4 Semantic chunking
- 4.6.5 Financial document chunking
- 4.7 Advanced retrieval techniques
- 4.7.1 Query expansion
- 4.7.2 Re-ranking
- 4.7.3 Metadata filtering
- 4.7.4 Parent document retrieval
- 4.7.5 Long-context prompting versus RAG/document-graph architectures
- 4.8 RAG implementation: Financial Q&
- A system
- 4.8.1 System architecture
- 4.8.2 Document processing pipeline.
- 4.9 Advanced RAG patterns
- 4.9.1 Corrective RAG (CRAG)
- 4.9.2 Self-RAG: Self-reflective retrieval
- 4.9.3 Agentic RAG
- 4.9.4 Choosing between advanced RAG patterns
- 4.10 RAG evaluation
- 4.10.1 Retrieval metrics
- 4.10.2 Generation metrics
- 4.10.3 Claim-level faithfulness as a formal contract
- 4.10.4 Evaluation protocol for regulated financial Q&
- A
- 4.10.5 End-to-end evaluation framework
- 4.11 Production considerations
- 4.11.1 Scaling RAG systems
- 4.11.2 Monitoring and observability
- 4.11.3 Continuous improvement
- 4.12 Financial RAG case studies
- 4.12.1 Case study 1: Earnings call analysis
- 4.12.2 Case study 2: Regulatory compliance Q&
- 4.12.3 Case study 3: Investment research assistant
- 4.13 Summary
- 4.14 Open questions
- 4.15 Exercises
- Chapter 5: Architectures and Applications of LLM Agents in Finance
- 5.1 Understanding the core concepts of agentic systems
- 5.1.1 LLM agent
- 5.1.2 Multi-agent system
- 5.1.3 The agent contract: stochastic reasoning, deterministic execution
- 5.1.4 Agent roles and specialization
- 5.1.5 Memory and state management
- 5.2 Failure modes and control requirements
- 5.2.1 Prompt injection and tool abuse
- 5.2.2 Hallucinations and unsupported claims
- 5.2.3 Escalation and loss of human oversight
- 5.2.4 Reliability and robustness
- 5.3 Applications of LLM agent systems in finance
- 5.3.1 Research and portfolio management
- 5.3.2 Risk and compliance
- 5.3.3 Operations and client service
- 5.3.4 From application idea to implementation requirements
- 5.3.5 Guided build: Minimal multi-agent research workstation
- 5.4 Design patterns for governed agentic workflows
- 5.4.1 Tool-centric agents
- 5.4.2 Role-based prompts
- 5.4.3 Human-in-the-loop design
- 5.4.4 Observable and testable workflows
- 5.4.5 Versioning and change management.
- 5.4.6 Layered guardrails and policy-as-code
- 5.4.7 Evaluation and monitoring as first-class design objects
- 5.4.8 Security, privacy, and permissioning
- 5.4.9 Cost, latency, and user experience
- 5.4.10 Documentation and model-risk artifacts
- 5.4.11 Supervisor-and-specialist pattern
- 5.4.12 Verifier and critic agents
- 5.4.13 Structured outputs before prose
- 5.5 Implementation roadmap
- 5.5.1 Phase 1: Workflow discovery
- 5.5.2 Phase 2: Read-only prototype
- 5.5.3 Phase 3: Controlled pilot
- 5.5.4 Phase 4: Governed production
- 5.6 Open problems and research directions
- 5.6.1 Evaluation and benchmarking
- 5.6.2 Control and coordination
- 5.6.3 Governance
- 5.7 Formal safety contract for agent workflows
- 5.8 Summary
- Chapter 6: Model Context Protocol and Hardened Tool Invocation in Financial Systems
- 6.1 What MCP standardizes and what it does not
- 6.1.1 Core protocol objects
- 6.1.2 Messages and transports
- 6.1.3 Authorization is optional at protocol level
- 6.1.4 Tools are model-controlled, not self-authorizing
- 6.2 The financial control envelope
- 6.2.1 A typed request contract
- 6.2.2 The minimum invariants
- 6.2.3 A minimal deterministic gate
- 6.3 Threat model, authorization, and least privilege for financial MCP deployments
- 6.3.1 From threats to control ownership
- 6.3.2 Trust boundaries and tool metadata
- 6.3.3 Authorization, consent, and least privilege
- 6.3.4 Permission modes and business effects
- 6.3.5 Consent and human review
- 6.4 Typed tools, numerical integrity, and evidence validity
- 6.4.1 Narrow tool contracts
- 6.4.2 Deterministic recomputation
- 6.4.3 Point-in-time evidence
- 6.4.4 Claim-level provenance
- 6.5 Execution semantics: idempotency, retries, and audit
- 6.5.1 Canonical request hashing
- 6.5.2 The audit record
- 6.6 Performance, reliability, and capacity planning.
- 6.6.1 A dimensionally consistent capacity objective.
- Notes:
- Description based on publisher supplied metadata and other sources.
- Other Format:
- Print version: Alonso, Miquel Noguer i Large Language Models in Finance
- ISBN:
- 9781837024520
- OCLC:
- 1609717565
The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.