Mastering NLP from Foundations to LLMs Apply Advanced Rule-Based Techniques to LLMs and Solve Real-world Business Problems Using Python

Enhance your NLP proficiency with modern frameworks like LangChain, explore mathematical foundations and code samples, and gain expert insights into current and future trends Key Features Learn how to build Python-driven solutions with a focus on NLP, LLMs, RAGs, and GPT Master embedding techniques...

Full description

Bibliographic Details
Main Author: Gazit, Lior (-)
Other Authors: Ghaffari, Meysam, Saxena, Asha
Format: eBook
Language:Inglés
Published: Birmingham : Packt Publishing, Limited 2024.
Edition:1st ed
Subjects:
See on Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009816679206719
Table of Contents:
  • Cover
  • Title page
  • Copyright and credits
  • Dedication
  • Foreword
  • Contributors
  • Disclaimer
  • Table of Contents
  • Preface
  • Chapter 1: Navigating the NLP Landscape: A comprehensive introduction
  • Who this book is for
  • What is natural language processing?
  • The history and evolution of natural language processing
  • Initial strategies in the machine processing of natural language
  • A winning synergy - the coming together of NLP and ML
  • Introduction to math and statistics in NLP
  • Understanding language models - ChatGPT example
  • Summary
  • Questions and answers
  • Chapter 2: Linear Algebra, Probability and Statistics, and Estimation for Machine Learning and Natur
  • Introduction to linear algebra
  • Basic operations on matrices and vectors
  • Matrix definitions
  • Eigenvalues and eigenvectors
  • Numerical methods for finding eigenvectors
  • Eigenvalue decomposition
  • Singular value decomposition
  • Basic probability for machine learning
  • Statistically independent
  • Discrete random variables and their distribution
  • Probability density function
  • Bayesian estimation
  • Summary
  • Further reading
  • References
  • Chapter 3: Machine Learning for Natural Language Processing
  • Technical requirements
  • Data exploration
  • Data visualization
  • Data cleaning
  • Feature selection
  • Feature engineering
  • Common machine learning models
  • Linear regression
  • Logistic regression
  • Decision trees
  • Random forest
  • Support vector machines (SVMs)
  • Neural networks and transformers
  • Model underfitting and overfitting
  • Splitting data
  • Hyperparameter tuning
  • Ensemble models
  • Bagging
  • Boosting
  • Stacking
  • Random forests
  • Gradient boosting
  • Handling imbalanced data
  • SMOTE
  • The NearMiss algorithm
  • Cost-sensitive learning
  • Data augmentation
  • Dealing with correlated data
  • Summary
  • References.
  • Chapter 4: Streamlining Text Preprocessing Techniques for Optimal NLP Performance
  • Technical requirements
  • Lowercasing in NLP
  • Removing special characters and punctuation
  • Stop word removal
  • NER
  • POS tagging
  • Rule-based methods
  • Statistical methods
  • Deep learning-based methods
  • Regular expressions
  • Tokenization
  • Explaining the preprocessing pipeline
  • Code for NER and POS
  • Summary
  • Chapter 5: Text Classification, Part 1 - Using Traditional Machine Learning
  • Technical requirements
  • Types of text classification
  • Supervised learning
  • Unsupervised learning
  • Semi-supervised learning
  • Sentence classification using one-hot encoding vector representation
  • Text classification using TF-IDF
  • Text classification using Word2Vec
  • Word2Vec
  • Model evaluation
  • Overfitting and underfitting
  • Hyperparameter tuning
  • Additional topics in applied text classification
  • Topic modeling - a particular use case of unsupervised text classification
  • LDA
  • Real-world ML system design for NLP text classification
  • Implementing an ML solution
  • Reviewing our use case - ML system design for NLP classification in a Jupyter Notebook
  • The pipeline
  • Code settings
  • Feature selection
  • Generating the chosen model
  • Summary
  • Chapter 6: Text Classification Reimagined: Delving Deep into Deep Learning Language Models
  • Technical requirements
  • Understanding deep learning basics
  • What is a neural network?
  • The basic design of a neural network
  • Neural network common terms
  • The architecture of different neural networks
  • The challenges of training neural networks
  • Language models
  • Semi-supervised learning
  • Unsupervised learning
  • Transfer learning
  • Understanding transformers
  • Architecture of transformers
  • Applications of transformers
  • Learning more about large language models.
  • The challenges of training language models
  • Specific designs of language models
  • Challenges of using GPT-3
  • Reviewing our use case - ML/DL system design for NLP classification in a Jupyter Notebook
  • The business objective
  • The technical objective
  • The pipeline
  • Summary
  • Chapter 7: Demystifying Large Language Models: Theory, Design, and Langchain Implementation
  • Technical requirements
  • What are LLMs and how are they different from LMs?
  • n-gram models
  • Hidden Markov models (HMMs)
  • Recurrent neural networks (RNNs)
  • How LLMs stand out
  • Motivations for developing and using LLMs
  • Improved performance
  • Broad generalization
  • Few-shot learning
  • Understanding complex contexts
  • Multilingual capabilities
  • Human-like text generation
  • Challenges in developing LLMs
  • Amounts of data
  • Computational resources
  • Risk of bias
  • Model robustness
  • Interpretability and debugging
  • Environmental impact
  • Different types of LLMs
  • Transformer models
  • Example designs of state-of-the-art LLMs
  • GPT-3.5 and ChatGPT
  • LM pretraining
  • Training the reward model
  • How to fine-tune the model using reinforcement learning
  • GPT-4
  • LLaMA
  • PaLM
  • Open-source tools for RLHF
  • Summary
  • References
  • Chapter 8: Accessing the Power of Large Language Models: Advanced Setup and Integration with RAG
  • Technical requirements
  • Setting up an LLM application - API-based closed source models
  • Choosing a remote LLM provider
  • Prompt engineering and priming GPT
  • Experimenting with OpenAI's GPT model
  • Setting up an LLM application - local open source models
  • About the different aspects that distinguish between open source and closed source
  • Hugging Face's hub of models
  • Employing LLMs from Hugging Face via Python
  • Exploring advanced system design - RAG and LangChain
  • LangChain's design concepts
  • Data sources.
  • Data that is not pre-embedded
  • Chains
  • Agents
  • Long-term memory and referring to prior conversations
  • Ensuring continuous relevance through incremental updates and automated monitoring
  • Reviewing a simple LangChain setup in a Jupyter notebook
  • Setting up a LangChain pipeline with Python
  • LLMs in the cloud
  • AWS
  • Microsoft Azure
  • GCP
  • Concluding cloud services
  • Summary
  • Chapter 9: Exploring the Frontiers: Advanced Applications and Innovations Driven by LLMs
  • Technical requirements
  • Enhancing LLM performance with RAG and LangChain - a dive into advanced functionalities
  • LangChain pipeline with Python - enhancing performance with LLMs
  • Advanced methods with chains
  • Asking the LLM a general knowledge question
  • Requesting output structure - making the LLM provide output in a particular data format
  • Evolving to a fluent conversation - inserting an element of memory to have previous interactions as reference and context for follow-up prompts
  • Retrieving information from various web sources automatically
  • Retrieving content from a YouTube video and summarizing it
  • Prompt compression and API cost reduction
  • Prompt compression
  • Experimenting with prompt compression and evaluating trade-offs
  • Multiple agents - forming a team of LLMs that collaborate
  • Potential advantages of multiple LLM agents working simultaneously
  • Concluding thoughts on the multiple-agent team
  • Summary
  • Chapter 10: Riding the Wave: Analyzing Past, Present, and Future Trends Shaped by LLMs and AI
  • Key technical trends around LLMs and AI
  • Computation power - the engine behind LLMs
  • The future of computational power in NLP
  • Large datasets and their indelible mark on NLP and LLMs
  • Purpose - training, benchmarking, and domain expertise
  • Value - robustness, diversity, and efficiency.
  • Impact - democratization, proficiency, and new concerns
  • Evolution of large language models - purpose, value, and impact
  • Purpose - why the push for bigger and better LLMs?
  • Value - the LLM advantage
  • Impact - changing the landscape
  • NLP and LLMs in the business world
  • Business sectors
  • Customer interactions and service - the early adopter
  • Change management driven by AI's impact
  • Behavioral trends induced by AI and LLMs - the social aspect
  • Personal assistants becoming indispensable
  • Ease in communication and bridging language barriers
  • Ethical implications of delegated decisions
  • Ethics and risks - growing concerns around the implementation of AI
  • Summary
  • Chapter 11: Exclusive Industry Insights: Perspectives and Predictions from World Class Experts
  • Overview of our experts
  • Nitzan Mekel-Bobrov, PhD
  • David Sontag, PhD
  • John D. Halamka, M.D., M.S.
  • Xavier Amatriain, PhD
  • Melanie Garson, PhD
  • Our questions and the experts' answers
  • Nitzan Mekel-Bobrov
  • Q1.1 - Future of LLM - hybrid learning paradigms: In light of the evolving landscape of learning schemes, what do you envision as the next breakthrough in combining different learning paradigms within LLMs?
  • Q2.1 - As the Chief AI Officer becomes more integral to the corporate hierarchy, what unique challenges do you foresee in bridging the gap between AI potential and practical business applications, and how should the CAIO's role evolve to meet these challe
  • Q3 - How do foundation models and the strategies of major tech companies toward open sourcing affect data ownership and its value for businesses?
  • David Sontag
  • Q1 - As we progress toward creating more equitable and unbiased datasets, what strategies do you believe are most effective in identifying and mitigating implicit biases within large datasets?.
  • Q2 - How do you see these strategies evolving with the advancement of NLP technologies, and what do you envision as the next breakthrough in combining different learning paradigms within LLMs?.