- عنوان کتاب: A Simple Guide to Retrieval Augmented Generation
- نویسنده: Abhinav Kimothi
- حوزه: مدل زبانی
- سال انتشار: 2025
- تعداد صفحه: 258
- زبان اصلی: انگلیسی
- نوع فایل: pdf
- حجم فایل: 5.26 مگابایت
اینکه ماشینها چگونه نیت انسان را درک میکنند، همیشه موضوع مورد علاقهی عمیق من بوده است. اگرچه سفرم به هوش مصنوعی و یادگیری ماشین را در سال ۲۰۰۷ آغاز کردم، اما در اوایل سال ۲۰۱۶ بود که هنگام ساخت یک تحلیلگر دادههای مجازی، مجذوب پردازش زبان طبیعی (NLP) شدم. وقتی گوگل در سال ۲۰۱۸ BERT را منتشر کرد، متقاعد شدم که NLP در آستانهی یک انقلاب است. در سال ۲۰۲۲، پس از انتشار text-davinci-002، مدلی در سری GPT-3 OpenAI، تصمیم گرفتم به Yarnit، یک پلتفرم بازاریابی محتوای مبتنی بر هوش مصنوعی مولد، بپیوندم تا ستون فقرات هوش مصنوعی این برنامه را بسازم. ماموریت این بود که پلتفرمی ایجاد کنم که در آن تیمهای بازاریابی محتوای سازمانی بتوانند داراییهای بازاریابی – پستهای رسانههای اجتماعی، وبلاگها، ایمیلها و موارد دیگر – را با سرعت بالا، مقیاس بزرگ و هزینه کمتر و با دقت بیشتر تولید کنند. به سرعت مشخص شد که هیچ مدل مولدی نمیتواند بدون گنجاندن دانش خاص برند و دسترسی به دادههای اختصاصی، به طور مؤثر به این هدف دست یابد. این درک مرا به بررسی تولید افزودهی بازیابی (RAG) سوق داد. مدلهای زبانی بزرگ (LLM) اغلب در برآورده کردن انتظارات کاربران شکست میخورند. اگرچه آنها در ذخیره و تولید دانش فوقالعاده مؤثر هستند، اما مستعد توهم نیز هستند – خروجیهای مطمئن اما نادرست. اینجاست که RAG یک پیشرفت ایجاد میکند و به LLMها اجازه میدهد تا قبل از تولید پاسخ، اطلاعات مرتبط، بلادرنگ و واقعی را بازیابی کنند. زیبایی RAG در سادگی مفهوم آن همراه با ظرافت پیادهسازی نهفته است. پتانسیل دگرگونکننده RAG در غلبه بر محدودیتهای اصلی LLMها همان چیزی است که هم محققان و هم متخصصان را عمیقاً درگیر خود نگه داشته است. وقتی من شروع به تحقیق در مورد RAG کردم، هنوز یک حوزه نسبتاً ناشناخته بود. منابع یادگیری رسمی کمیاب بودند و بیشتر دانش در وبلاگها، پستهای رسانههای اجتماعی، مقالات تحقیقاتی و انجمنهای گفتگو پراکنده بود. من بسیاری از یافتههای خودم را در پلتفرمهای اجتماعی و پستهای وبلاگ به اشتراک گذاشتم. در نهایت، ایده تجمیع همه این آموختهها در یک کتاب جامع شکل گرفت. با هدف ایجاد یک منبع ساده و کاربردی برای متخصصان فناوری که برنامههای کاربردی مبتنی بر LLM میسازند، کار روی این کتاب را در اواسط سال 2024 آغاز کردم. با گذشت زمان، این کتاب به یک راهنمای اساسی برای RAG تبدیل شده است که هم وسعت و هم عمق را پوشش میدهد، در حالی که پیادهسازی عملی را از طریق توضیحات واضح و کد ساده پایتون تضمین میکند. من کاملاً معتقدم که RAG یک مهارت ضروری برای هر کسی است که با برنامههای هوش مصنوعی کار میکند و تسلط بر آن نیاز به یک پایه مفهومی محکم دارد. این کتاب دقیقاً برای ارائه همین امر طراحی شده است. نوشتن آن یک تجربه فوقالعاده غنی بوده است و من در طول این مسیر چیزهای زیادی آموختهام. امیدوارم آن را هم آموزنده و هم لذتبخش بیابید.
How machines understand human intent has always been a subject of deep interest for me. Although I embarked on my journey into AI and machine learning in 2007, it was in early 2016 that I became fascinated by natural language processing (NLP), while building a virtual data analyst. When Google released BERT in 2018, I became convinced that NLP was on the brink of a revolution. In 2022, following the release of text-davinci-002, a model in OpenAI’s GPT-3 series, I decided to join Yarnit, a generative-AI-based content marketing platform, to build the AI backbone of the application. The mission was to create a platform where enterprise content marketing teams could generate marketing assets—social media posts, blogs, emails, and more—at high speed, large scale, and lower cost, with greater accuracy. It quickly became apparent that no generative model could achieve this effectively without incorporating brand-specific knowledge and access to proprietary data. This realization led me to explore retrieval-augmented generation (RAG). Large language models (LLMs) often fail to meet user expectations. While they are incredibly effective at storing and generating knowledge, they are also prone to hallucinations— confident yet incorrect outputs. This is where RAG provides a breakthrough, allowing LLMs to retrieve relevant, real-time, and factual information before generating responses. The beauty of RAG lies in its simplicity of concept combined with the nuance of implementation. The transformative potential of RAG in overcoming LLMs’ core limitations is what has kept both researchers and practitioners deeply engaged. When I began researching RAG, it was still a relatively unexplored area. Formal learning resources were scarce, and most knowledge was scattered across blogs, social media posts, research papers, and discussion forums. I shared many of my own findings on social platforms and in blog posts. Eventually, the idea of consolidating all these learnings into a comprehensive book took shape. With the goal of creating a simple, practical resource for technology professionals building LLM-based applications, I started working on this book in mid-2024. Over time, it has evolved into a foundational guide to RAG, covering both breadth and depth, while ensuring practical implementation through clear explanations and simple Python code. I firmly believe that RAG is an essential skill for anyone working with AI applications and that mastering it requires a solid conceptual foundation. This book is designed to provide just that. Writing it has been an incredibly enriching experience, and I have learned a great deal along the way. I hope you find it both enlightening and enjoyable.
این کتاب را میتوانید از لینک زیر بصورت رایگان دانلود کنید:
نظرات کاربران