- عنوان کتاب: Context Engineering
- نویسنده: Boni García
- حوزه: مهندسی بافت
- سال انتشار: 2026
- تعداد صفحه: 319
- زبان اصلی: انگلیسی
- نوع فایل: pdf
- حجم فایل: 3.85 مگابایت
هوش مصنوعی (AI) یکی از سریعترین چرخههای پذیرش فناوری را در تاریخ معاصر هدایت میکند. قابل مشاهدهترین بخش این موج، هوش مصنوعی مولد (GenAI) است، دستهای از سیستمهای هوش مصنوعی که برای تولید محتوای جدید از ورودی زبان طبیعی، شامل متن، کد، تصاویر، موسیقی و ویدیو طراحی شدهاند. در هسته GenAI مبتنی بر متن، مدلهای زبان بزرگ (LLM) قرار دارند، مدلهای یادگیری عمیق که قادر به تفسیر و تولید زبان شبیه انسان هستند. در عمل، اثربخشی یک سیستم مبتنی بر LLM به زمینه آن بستگی دارد، به معنای اطلاعات موجود برای مدل در زمان استنتاج. مهندسی زمینه، رشتهای است که به انتخاب، سازماندهی و بهروزرسانی آن اطلاعات میپردازد تا مدل، ورودیهای مناسب را به شکل مناسب، در زمان مناسب و در محدوده پنجره زمینه خود دریافت کند. این فصل مبانی مهندسی زمینه و نحوه سازماندهی این کتاب پیرامون آنها را معرفی میکند. سپس تکامل سیستمهای هوش مصنوعی، از تعاملات ساده با LLMها گرفته تا گردشهای کاری، عاملها و سیستمهای عامل را بررسی میکند. در مرحله بعد، محدودیتهای LLMها را بررسی میکند که مهندسی زمینه را برای ساخت سیستمهای هوش مصنوعی مدرن ضروری میسازد. در نهایت، مروری بر منابعی که زمینه را در سیستمهای مبتنی بر LLM شکل میدهند، ارائه میدهد: دستورالعملها، دانش خارجی، ابزارها، حافظه، وضعیت و دستورالعملهای کاربر. مهندسی سریع، عملی برای طراحی و اصلاح ورودی برای یک LLM (به نام دستورالعمل) است تا خروجیهای آن را به سمت نتایج دقیقتر، مفیدتر یا خلاقانهتر هدایت کند. این موضوع در اوایل سال 2023 پس از انتشار عمومی ChatGPT و سایر مدلهای در دسترس، زمانی که میلیونها کاربر کشف کردند که کیفیت پاسخ به شدت به کلمات، ساختار یا علائم نگارشی بستگی دارد، به سرعت مورد توجه قرار گرفت. این کشف، هم قدرت این مدلها و هم غیرقابل پیشبینی بودن فرآیندی را که اغلب به آزمون و خطا متکی بود، آشکار کرد. با این حال، مهندسی سریع تنها بخشی از مشکل را برطرف میکند. با گذشت زمان، متخصصان تشخیص دادند که رفتار LLM نه تنها توسط کلمات سریع، بلکه توسط زمینه وسیعتری که مدل در آن عمل میکند نیز شکل میگیرد. این دیدگاه وسیعتر، مهندسی زمینه را به وجود آورد، رشتهای که سیستمهای هوش مصنوعی را به اطلاعات مورد نیاز برای انجام مؤثر یک کار مجهز میکند. در عمل، این به معنای تصمیمگیری در مورد قرار دادن چه چیزی در پنجره زمینه است، مقدار محدودی از متنی که مدل میتواند همزمان پردازش کند، که معمولاً با توکنها اندازهگیری میشود، واحدهای متنی داخلی مورد استفاده توسط LLM. یک مثال ساده را در نظر بگیرید. در یک رویکرد مهندسیشده با اعلان، کاربر اعلان را مینویسد: “گزارش حادثه پیوست شده را خلاصه کنید و علت اصلی را شناسایی کنید.” در این حالت، LLM عمدتاً به متن اعلان و آموزش قبلی آن بستگی دارد که میتواند منجر به حذف یا تفسیر نادرست شود. در یک رویکرد مهندسیشده با متن، برنامه گزارش را بازیابی میکند، مرتبطترین بخشها را انتخاب میکند و آنها را به فراخوانی مدل تزریق میکند. اعلان ممکن است یکسان باقی بماند، اما مدل یک زمینه تنظیمشده دریافت میکند که حل وظیفه را با اطمینان بیشتری امکانپذیر میکند.
Artificial intelligence (AI) is driving one of the fastest technology adoption cycles in recent history. The most visible part of this wave is generative AI (GenAI), a class of AI systems designed to produce novel content from natural-language input, including text, code, images, music, and video. At the core of text-based GenAI are large language models (LLMs), deep learning models capable of interpreting and generating human-like language. In practice, the effectiveness of an LLM-based system depends on its context, meaning the information available to the model at inference time. Context engineering is the discipline of selecting, organizing, and updating that information so the model receives the right inputs in the right form, at the right time, and within the limits of its context window. This chapter introduces the foundations of context engineering and how this book is organized around them. It then reviews the evolution of AI systems, from simple interactions with LLMs to workflows, agents, and agentic systems. Next, it examines the limitations of LLMs that make context engineering essential for building modern AI systems. Finally, it provides an overview of the sources that shape context in LLM-based systems: instructions, external knowledge, tools, memory, state, and user prompts. Prompt engineering is the practice of designing and refining the input for an LLM (called prompt) to guide its outputs toward more accurate, useful, or creative results. It gained rapid attention in early 2023 after the public release of ChatGPT and other widely accessible models, when millions of users discovered that response quality depended strongly on wording, structure, or punctuation. This discovery revealed both the power of these models and the unpredictability of a process that often relied on trial and error. However, prompt engineering addresses only part of the problem. Over time, practitioners recognized that LLM behavior is shaped not only by prompt wording but also by the broader context in which the model operates. This broader view gave rise to context engineering, the discipline of equipping AI systems with the information needed to complete a task effectively. In practice, this means deciding what to place in the context window, the limited amount of text the model can process at once, usually measured in tokens, the internal text units used by the LLM. Consider a simple example. In a prompt-engineered approach, the user writes the prompt “Summarize the attached incident report and identify the root cause.” In this case, the LLM depends mainly on the prompt wording and its prior training, which can lead to omissions or misinterpretations. In a context-engineered approach, the application retrieves the report, selects the most relevant sections, and injects them into the model call. The prompt may remain the same, but the model receives a curated context that makes the task more reliably solvable.
این کتاب را میتوانید از لینک زیر بصورت رایگان دانلود کنید:
Download: Context Engineering





نظرات کاربران