[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-682046-105":59,"doc-detail-682046-en":130,"doc-similar-682046":171},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","agent-tooling-memory-and-context-cse-291a-lecture-7","Agent Tooling - Memory and Context - CSE 291A - Lecture 7","","CSE 291A lecture 07 explains why LLM agents stand out through language mastery, decision-making, flexibility, and collaborative interactions. It develops the “Brain and Limbs” analogy, showing how models use tools to extend capabilities, improve reliability, and enable real-world actions. It then covers how LLMs call tools via instruction tuning, system prompts, and in-context learning, outlining each method’s workflow, advantages, and limitations. Common agent use cases across data science, retrieval, productivity, DevOps, and creative work are summarized.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/agent-tooling-memory-and-context-cse-291a-lecture-7/682046/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/agent-tooling-memory-and-context-cse-291a-lecture-7/682046.png","ImageObject",300,407,{"name":92,"@type":93},"Stanley","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-28","2026-11-06",true,{"@type":102,"interactionType":103,"userInteractionCount":19},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What capabilities make LLM agents particularly effective?","Question",{"text":112,"@type":113},"They excel at language mastery, reasoning and decision-making, adapting to diverse applications, and coordinating with humans or other agents.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How does the “Brain and Limbs” analogy explain tool use?",{"text":117,"@type":113},"The model (“brain”) reasons and plans, while tools (“limbs”) extend capabilities, improve reliability by offloading weak tasks, and enable real-world actions like using APIs.",{"name":119,"@type":110,"acceptedAnswer":120},"What are the three primary methods for LLMs to know about tools?",{"text":121,"@type":113},"Instruction tuning, system prompts (e.g., ReAct), and in-context learning with few-shot tool-call examples.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},682046,1793958916,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":19,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":34,"preview_urls":145},2336477405376,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","Agent Tooling, Memory, and Context  \nCSE 291A · October 15, 2026  \nYiying Zhang  \nWhy LLM Agents stand out?  \nƔ Language Mastery: Their inherent capability to both comprehend and produce language ensures seamless user interaction .  \nƔ Decision-making: LLMs are equipped to reason and decide, making them adept at solving intricate issues .  \nƔ Flexibility: Their adaptability ensures they can be molded for diverse applications .  \nƔ Collaborative Interactions: They can collaborate with humans or other agents, paving the way for multifaceted interactions .  \nThe \"Brain and Limbs\" Analogy  \n• LLM (The Brain):  \n• Performs complex reasoning.  \n• Understands user intent.  \n• Formulates plans.  \n• Summarize information and write output.  \n• Tools (The “Limbs\"):  \n• Extend Capabilities: Access data the brain doesn't have (e.g. , Google Search) .  \n• Improve Reliability: Oﬄoad tasks the brain is bad at (e.g. , use a calculator for math) .  \n• Enable Real-World Actions : Interact with the world (e.g. , use an API to send an email) .  \nHow Do Models Call Tools?  \n• LLMs do not execute tools directly.  \n• LLMs “learn” to generate tool call syntax  \n• A system orchestration layer (or simply your code) intercept and execute  \n• Three primary methods for LLMs to know about tools  \n• Instruction Tuning (Fine-Tuning)  \n• System Prompt (e.g. , ReAct)  \n• In-Context Learning (Few-Shot)  \nMethod 1: Instruction Tuning  \n• An LLM explicitly ﬁne-tuned on a dataset of (Instruction, Tool Call, Tool Output, Final Answer) examples, e.g. , Toolformer, TALM  \n• Fine-tuned to recognize when an instruction requires a tool and to emit the exact syntax, like \u003Ctool_call>weather_api(location=‘Seoul')\u003C/tool_call> .  \n• Knowledge of tool use baked into model weights  \n• Pro: Very fast and reliable for known tools.  \n• Con: Not ﬂexible; cannot easily add new tools without re-tuning.  \nLLMs + training for tool use: TALM  \nTALM: Tool Augmented Language Models  \nTALM: Tool Augmented Language Models  \nLLMs + training for tool use: Toolformer  \nToolformer: Language Models Can Teach Themselves to Use Tools  \nMethod 2: System Prompt  \n• A system prompt instructs the LLM to call tools, e.g. , with a ReAct loop  \n• Reason: LLM thinks step-by-step about what it needs.  \n• Tool Call: LLM decides to call a tool and generates the tool call syntax.  \n• Tool Execution: Outside the LLM, execute the tool, get result, and feed back to LLM  \n• Repeats this loop until it has enough information to answer the user.  \n• Pro: Flexible; new tools can be added just by describing them in the prompt  \n• Cons: Can be less reliable than ﬁne-tuning; agent can get \"stuck in a loop”, making errors or inducing many LLM calls.  \nMethod 3: In-Context Learning  \n• Provide a few examples (few-shot prompting)  \n• User: What's the weather in SF? Model:\u003Ctool_call>weather('SF')\u003C/tool_call> System:\u003Ctool_response>{\"temp\": 65}\u003C/tool_response> Model: The weather in SF is 65. --- (New query) ---User: What about Seoul?  \n• Model: \u003Ctool_call>weather(‘Seoul')\u003C/tool_call>  \n• Pro: Flexible; new tools can be added just by describing them in the prompt  \n• Con: Longer context, can be less reliable than ﬁne-tuning, needs good examples  \nCommon Agent Use Cases  \n• Data Science : Writing and executing Python code to analyze data, plot charts, and check statistical results.  \n• Search & Retrieval : Answering questions with up-to-date information by fetching and summarizing web content.  \n• Productivity : Managing calendars, drafting emails, and summarizing documents.  \n• DevOps: Reading logs, diagnosing errors, suggesting code ﬁxes, or managing cloud infrastructure via CLI tools.  \n• Creative Work: Generating images with tools like DALL-E, or composing music snippets via a MIDI API.","cbCaidc19wGpvOmG","https://ap.wps.com/l/cbCaidc19wGpvOmG","pdf",24879013,62,"English","# Why LLM Agents Stand Out?\n## The \"Brain and Limbs\" Analogy\n# How Do Models Call Tools?\n## Method 1: Instruction Tuning\n## Method 2: System Prompt\n## Method 3: In-Context Learning\n# Common Agent Use Cases","[{\"question\":\"What capabilities make LLM agents particularly effective?\",\"answer\":\"They excel at language mastery, reasoning and decision-making, adapting to diverse applications, and coordinating with humans or other agents.\"},{\"question\":\"How does the “Brain and Limbs” analogy explain tool use?\",\"answer\":\"The model (“brain”) reasons and plans, while tools (“limbs”) extend capabilities, improve reliability by offloading weak tasks, and enable real-world actions like using APIs.\"},{\"question\":\"What are the three primary methods for LLMs to know about tools?\",\"answer\":\"Instruction tuning, system prompts (e.g., ReAct), and in-context learning with few-shot tool-call examples.\"}]","Agent Tooling - Memory and Context - CSE 291A - Lecture 7 | PDF",156,[146,150,153,157,160,164,168],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/d07cac2453754fee2e4f1b97e5a64408.webp",983,552,{"page_no":14,"url":151,"width":152,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/2bc6e294a3e23c7b55c1ff1d366c9aee.webp",982,{"page_no":81,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/237e9d5413af570c360a2843d4ecef45.webp",981,551,{"page_no":19,"url":158,"width":159,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/27d8bc0d2baab372e410a4187755ecbb.webp",980,{"page_no":24,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/ae0969589602dd3661c80468ce662e1b.webp",979,550,{"page_no":29,"url":165,"width":166,"height":167},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/47647983c78e7e0c315438dd4ee81bbf.webp",978,549,{"page_no":34,"url":169,"width":170,"height":167},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/da3a32e204dc5383a4df77ed32b2a2ac.webp",977,{"list":172,"token":66},[173,179,186,193,199,205,212,218,224,231],{"doc_id":174,"doc_title":175,"file_type":137,"home_preview_img_url":176,"slug":177,"view_count":29,"category_name":30,"create_tm":178},682640,"Quick Start Guide to Large Language Models - Strategies and Best Practices for ChatGPT, Embeddings, Fine-Tuning, and Multimodal AI","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999672778/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109899&Signature=VrhEtQ0TEVuxkOnIOmbUsO8EjaM%3D","quick-start-guide-to-large-language-models-strategies-and-best-practices-for-chatgpt-embeddings-fine-tuning-and-multimodal-ai",1793977146,{"doc_id":180,"doc_title":181,"file_type":137,"home_preview_img_url":182,"slug":183,"view_count":184,"category_name":30,"create_tm":185},81539,"GRAINS Gradient based Attribution for Inference Time Steering of LLMs and VLMs","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229808453981/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109899&Signature=TLIx1Vrp0XgOWl9KnOluiw0BWQA%3D","grains-gradient-based-attribution-for-inference-time-steering-of-llms-and-vlms",17,1784174150,{"doc_id":187,"doc_title":188,"file_type":137,"home_preview_img_url":189,"slug":190,"view_count":191,"category_name":30,"create_tm":192},124057,"AI-driven devops - Leveraging Machine Learning for Automated Software Deployment and Maintenance","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229837070329/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109899&Signature=ghVUFq72echurULhBWGXo8dEmac%3D","ai-driven-devops-leveraging-machine-learning-for-automated-software-deployment-and-maintenance",33,1785820124,{"doc_id":194,"doc_title":195,"file_type":137,"home_preview_img_url":196,"slug":197,"view_count":41,"category_name":30,"create_tm":198},86537,"ToolAtlas Learning Once Reusing Everywhere with Tool Side Memory","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809425789/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109899&Signature=hfIvun9HlRBfWC6s%2Bjp6kwE%2Fzsg%3D","toolatlas-learning-once-reusing-everywhere-with-tool-side-memory",1784212484,{"doc_id":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":191,"category_name":30,"create_tm":204},85450,"TENET: One Step Toward Test-Driven Development for Repository-Level Code Generation","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229809269417/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109899&Signature=ClibZerOgRuhbNq03CY3usVqJR8%3D","tenet-one-step-toward-test-driven-development-for-repository-level-code-generation",1784203642,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":210,"category_name":30,"create_tm":211},123346,"Leveraging Ethical Narratives to Enhance LLM-AutoML Generated Machine Learning Models","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229837009764/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109899&Signature=txd%2BPMQxNqm8oSAtWIcJDe2hdBc%3D","leveraging-ethical-narratives-to-enhance-llm-automl-generated-machine-learning-models",28,1785816052,{"doc_id":213,"doc_title":214,"file_type":137,"home_preview_img_url":215,"slug":216,"view_count":19,"category_name":30,"create_tm":217},698670,"Code Generation for Niche Programming Languages with Large Language Models","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230009270826/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109899&Signature=76DlU3glhVceDplOm6SQ9PpD7Uc%3D","code-generation-for-niche-programming-languages-with-large-language-models",1794454396,{"doc_id":219,"doc_title":220,"file_type":137,"home_preview_img_url":221,"slug":222,"view_count":52,"category_name":30,"create_tm":223},641416,"LCD TV - Owner’s Manual - Preparation - Installation","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229970437857/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109899&Signature=9LjI0V9FLX8sRWWlXW4HWpP2%2BI4%3D","lcd-tv-owners-manual-preparation-installation",1792713936,{"doc_id":225,"doc_title":226,"file_type":137,"home_preview_img_url":227,"slug":228,"view_count":229,"category_name":30,"create_tm":230},327419,"kNNGuard: Turning LLM Hidden Activations into a Training-Free Configurable Guardrail","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229909085360/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109899&Signature=9cR%2F8ZYRmqMvp7v9xKywZ3ccz8E%3D","knnguard-turning-llm-hidden-activations-into-a-training-free-configurable-guardrail",12,1789977161,{"doc_id":232,"doc_title":233,"file_type":137,"home_preview_img_url":234,"slug":235,"view_count":236,"category_name":30,"create_tm":237},701572,"Building Production-Ready AI Agents with LlamaIndex - From First Query to Multi-Agent Systems - A Practical Guide for Python Developers","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230011609397/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796109899&Signature=%2FO4K3x9euBuH1BxtJ1wKXyrxVHw%3D","building-production-ready-ai-agents-with-llamaindex-from-first-query-to-multi-agent-systems-a-practical-guide-for-python-developers",14,1794533229]