- عنوان کتاب: Building AI Agents with LLMs, RAG, and Knowledge Graphs
- نویسنده: Salvatore Raieli, Gabriele Iuculano
- حوزه: عامل هوش مصنوعی
- سال انتشار: 2025
- تعداد صفحه: 555
- زبان اصلی: انگلیسی
- نوع فایل: pdf
- حجم فایل: 18.3 مگابایت
کتاب «ساخت عاملهای هوش مصنوعی با LLMها، RAGها و نمودارهای دانش» شما را با چشمانداز در حال تکامل مدلهای زبانی بزرگ (LLMها) و عاملهای هوش مصنوعی آشنا میکند و هم مبانی نظری و هم راهنماییهای عملی را ارائه میدهد. این کتاب با توضیح چگونگی نمایش و پردازش دادههای متنی با استفاده از یادگیری عمیق آغاز میشود، سپس به معماریهای مدرن مانند مدل Transformer میپردازد. از آنجا، کتاب به بررسی چگونگی مقیاسبندی و تنظیم دقیق LLMها و چگونگی گسترش قابلیتهای آنها با ابزارها، سیستمهای حافظه خارجی و چارچوبهای مبتنی بر عامل میپردازد. فناوریهایی مانند تولید افزوده بازیابی (RAG)، GraphRAG و سیستمهای چندعاملی با تمرکز بر برنامههای کاربردی و استقرار در دنیای واقعی به تفصیل توضیح داده شدهاند. در پایان کتاب، شما درک روشنی از نحوه ساخت عاملهای هوش مصنوعی هوشمند و ابزار-محور و نقشی که این سیستمها در شکلدهی آینده هوش مصنوعی ایفا میکنند، خواهید داشت. این کتاب برای مهندسان نرمافزار، دانشمندان داده و محققانی که میخواهند برنامههای کاربردی را با استفاده از LLMها و عاملهای هوش مصنوعی درک و بسازند، در نظر گرفته شده است. برای بهرهمندی کامل از محتوا، درک اولیه از برنامهنویسی پایتون و مفاهیم بنیادی در یادگیری ماشین توصیه میشود. اگرچه هیچ تخصص عمیقی در NLP لازم نیست، آشنایی با شبکههای عصبی، APIهای REST و شیوههای کلی توسعه نرمافزار به شما کمک میکند تا مثالها را دنبال کنید و سیستمهای دنیای واقعی را پیادهسازی کنید. چه به دنبال ساخت عاملهای هوشمند باشید، چه به دنبال بررسی سازوکار درونی LLMها یا استقرار برنامههای هوش مصنوعی در مقیاس بزرگ، این کتاب هم پیشینه نظری و هم راهنمایی عملی برای شروع کار را ارائه میدهد. فصل 1، تجزیه و تحلیل دادههای متنی با یادگیری عمیق، نحوه پردازش و نمایش زبان طبیعی را در قالبی مناسب برای مدلهای یادگیری ماشین معرفی میکند. این فصل تکنیکهای مختلف رمزگذاری متن را از رمزگذاری اولیه one-hot و bag of words گرفته تا نمایشهای پیشرفتهتر مانند TF-IDF و word2vec پوشش میدهد. سپس این فصل معماریهای کلیدی یادگیری عمیق را برای دادههای ترتیبی، مانند RNNها، LSTMها، GRUها و CNNها، بررسی میکند و نحوه اعمال آنها را در وظایف طبقهبندی متن نشان میدهد. در پایان این فصل خواهید فهمید که چگونه این مبانی، مدلهای زبانی مدرن مانند ChatGPT را فعال میکنند. فصل 2، ترانسفورماتور: مدل پشت انقلاب هوش مصنوعی مدرن، مکانیسمهای توجه را معرفی میکند و توضیح میدهد که چگونه آنها به معماری ترانسفورماتور تکامل یافتهاند. این فصل محدودیتهای مدلهای قبلی مانند RNNها و LSTMها را برجسته میکند و نشان میدهد که چگونه مبدلها بر آنها غلبه کردند و به پایه و اساس NLP مدرن تبدیل شدند. مباحث کلیدی شامل خودتوجهی، مدلسازی زبان پنهان، تکنیکهای آموزش و تجسم مدل داخلی است. این فصل با نشان دادن کاربردهای دنیای واقعی و ایجاد زمینه برای درک LLMهای امروزی به پایان میرسد. فصل 3، بررسی LLMها به عنوان یک موتور هوش مصنوعی قدرتمند، بررسی میکند که چگونه آموزش در مقیاس بزرگ مدلهای مبدل باعث ایجاد LLMهای امروزی شده است. این فصل تکامل، قابلیتها و محدودیتهای آنها، از جمله تکنیکهایی مانند تنظیم دستورالعمل، تنظیم دقیق و همترازی را بررسی میکند. همچنین انواع LLM فشردهتر و کارآمدتر، مدلهای چندوجهی که انواع دادههای چندگانه را مدیریت میکنند و درک چالشهایی مانند توهم، نگرانیهای اخلاقی و مهندسی سریع را معرفی میکند. فصل 4، ساخت یک عامل وب اسکرپینگ با LLM، مفهوم عاملهای هوش مصنوعی را به عنوان بسطی از LLMها معرفی میکند که هدف آن غلبه بر توانایی آنها در انجام اقدامات است. این فصل به بررسی ویژگیهای کلیدی عاملها و تمایزات بین سیستمهای تک عاملی و چند عاملی میپردازد. همچنین کتابخانههای اصلی مورد استفاده برای ساخت عاملها را ارائه میدهد و شما را در ایجاد یک عامل وب اسکرپینگ که قادر به بازیابی اطلاعات از اینترنت است، راهنمایی میکند. فصل 5، توسعه عامل شما با RAG برای جلوگیری از توهمات، بررسی میکند که چگونه RAG میتواند بر محدودیتهای کلیدی LLMها، مانند دانش قدیمی و توهمات، غلبه کند. این فصل توضیح میدهد که چگونه RAG یک LLM را قادر میسازد تا از طریق جاسازی و پایگاههای داده برداری به منابع اطلاعات خارجی دسترسی پیدا کند و در نتیجه دقت و سازگاری را بهبود بخشد. همچنین RAG را با تنظیم دقیق مقایسه میکند و کاربرد عملی آن را با ساخت یک عامل توصیه فیلم نشان میدهد. فصل 6، تکنیکهای پیشرفته RAG برای بازیابی و افزایش اطلاعات، با معرفی پیشرفتها در هر مرحله از خط لوله – دریافت دادهها، نمایهسازی، بازیابی و تولید – معماری پایه RAG را گسترش میدهد. این فصل به بررسی RAG مدولار، تکنیکهایی برای مقیاسبندی سیستمها با مجموعه دادههای بزرگ و پایگاههای کاربری و نگرانیهای کلیدی مانند استحکام و حریم خصوصی میپردازد. همچنین چالشهای فعلی و سوالات بیپاسخ پیرامون توسعه آینده سیستمهای مبتنی بر RAG را برجسته میکند. فصل 7، ایجاد و اتصال یک نمودار دانش به یک عامل هوش مصنوعی، به بررسی چگونگی ساختاردهی دانش متنی به نمودارهای دانش (KGs) برای افزایش بازیابی اطلاعات و استدلال در عاملهای هوش مصنوعی میپردازد. این فصل مفهوم GraphRAG را معرفی میکند، که در آن از KGs برای تقویت LLMها با دادههای زمینهای ساختاریافته استفاده میشود. این فصل چگونگی … LLMها را پوشش میدهد.
Building AI Agents with LLMs, RAG, and Knowledge Graphs introduces you to the evolving landscape of large language models (LLMs) and AI agents, offering both a theoretical foundation and practical guidance. It begins by explaining how text data can be represented and processed using deep learning, then progresses to modern architectures such as the Transformer model. From there, the book explores how LLMs are scaled and fine-tuned, and how their capabilities can be extended with tools, external memory systems, and agent-based frameworks. Technologies such as retrieval-augmented generation (RAG), GraphRAG, and multi-agent systems are explained in detail, with a focus on real-world applications and deployment. By the end of the book, you will have a clear understanding of how to build intelligent, tool-using AI agents and the role these systems play in shaping the future of AI. This book is intended for software engineers, data scientists, and researchers who want to understand and build applications using LLMs and AI agents. A basic understanding of Python programming and foundational concepts in machine learning is recommended to fully benefit from the content. While no deep expertise in NLP is required, familiarity with neural networks, REST APIs, and general software development practices will help you follow the examples and implement real-world systems. Whether you’re looking to build intelligent agents, explore the inner workings of LLMs, or deploy AI applications at scale, this book provides both the theoretical background and practical guidance to get started. Chapter 1, Analyzing Text Data with Deep Learning, introduces how to process and represent natural language in a format suitable for machine learning models. It covers various text encoding techniques, from basic one-hot encoding and bag of words to more advanced representations such as TF-IDF and word2vec. The chapter then explores key deep learning architectures for sequential data, such as RNNs, LSTMs, GRUs, and CNNs, and demonstrates how to apply them to text classification tasks. By the end of this chapter you will understand how these foundations enable modern language models such as ChatGPT. Chapter 2, The Transformer: The Model Behind the Modern AI Revolution, introduces attention mechanisms and explains how they evolved into the transformer architecture. The chapter highlights the limitations of earlier models such as RNNs and LSTMs, and shows how transformers overcame them to become the foundation of modern NLP. Key topics include self-attention, masked language modeling, training techniques, and internal model visualization. The chapter concludes by demonstrating real-world applications and laying the groundwork for understanding today’s LLMs. Chapter 3, Exploring LLMs as a Powerful AI Engine, examines how the large-scale training of transformer models gave rise to today’s LLMs. The chapter explores their evolution, capabilities, and limitations, including techniques such as instruction tuning, fine-tuning, and alignment. It also introduces more compact and efficient LLM variants, multimodal models that handle multiple data types, and understanding challenges such as hallucinations, ethical concerns, and prompt engineering. Chapter 4, Building a Web Scraping Agent with an LLM, introduces the concept of AI agents as an extension of LLMs, aimed at overcoming their ability to perform actions. The chapter explores the key characteristics of agents, and distinctions between single and multi-agent systems. It also presents the main libraries used for building agents and guides you through the creation of a web-scraping agent capable of retrieving information from the internet. Chapter 5, Extending Your Agent with RAG to Prevent Hallucinations, explores how RAG could overcome key limitations of LLMs, such as outdated knowledge and hallucinations. The chapter explains how RAG enables an LLM to access external information sources through embedding and vector databases, thereby improving accuracy and adaptability. It also compares RAG with fine-tuning and demonstrates its practical use by building a movie recommendation agent. Chapter 6, Advanced RAG Techniques for Information Retrieval and Augmentation, expands on the basic RAG architecture by introducing enhancements at every stage of the pipeline—data ingestion, indexing, retrieval, and generation. The chapter explores modular RAG, techniques for scaling systems with large datasets and user bases, and key concerns such as robustness and privacy. It also highlights current challenges and open questions surrounding the future development of RAG-based systems. Chapter 7, Creating and Connecting a Knowledge Graph to an AI Agent, explores how to structure textual knowledge into knowledge graphs (KGs) to enhance information retrieval and reasoning in AI agents. The chapter introduces the concept of GraphRAG, where KGs are used to augment LLMs with structured contextual data. It covers how LLMs can be used to build KGs by extracting entities and relationships, how to use graphs for querying and reasoning, and discusses the benefits, limitations, and future directions of combining different approaches. Chapter 8, Reinforcement Learning and AI Agents, explores how agents can learn by interacting with dynamic environments, adjusting their behavior based on experience. It introduces the fundamentals of reinforcement learning, explains how agents make decisions and improve over time, and demonstrates how neural networks can be used to guide behavior. The chapter concludes by discussing how LLMs can be combined with reinforcement learning to build more capable AI systems. Chapter 9, Creating Single- and Multi-Agent Systems, explores how LLMs can be extended with tools and other models to form autonomous agents. It introduces the concept of single-agent and multiagent systems, shows how LLMs can interact with APIs or external models, and presents key examples such as HuggingGPT. The chapter also covers agent coordination strategies, real-world applications in complex domains, and emerging business paradigms such as SaaS, MaaS, DaaS, and RaaS. Chapter 10, Building an AI Agent Application, addresses the challenges of scaling and deploying AI agents in real-world applications. It introduces Streamlit as a rapid prototyping framework to create both frontend and backend components of an agent-based system. The chapter also covers key operational aspects such as asynchronous programming, containerization with Docker, and best practices for building scalable, production-ready AI solutions. Chapter 11, The Future Ahead, explores the transformative potential of AI agents across industries such as healthcare and beyond. Building on the advancements discussed in earlier chapters, it reflects on the remaining technical and ethical challenges facing LLMs and agent systems. The chapter concludes by examining open questions and future directions in the development and deployment of intelligent AI agents.
این کتاب را میتوانید از لینک زیر بصورت رایگان دانلود کنید:
Download: Building AI Agents with LLMs, RAG, and Knowledge Graphs
نظرات کاربران