<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shibuiyusuke</author_name>
  <author_url>https://blog.hatena.ne.jp/shibuiyusuke/</author_url>
  <blog_title>LayerX エンジニアブログ</blog_title>
  <blog_url>https://tech.layerx.co.jp/</blog_url>
  <categories>
    <anon>AI Agent</anon>
    <anon>Python</anon>
    <anon>LLM</anon>
  </categories>
  <description>LLMとの対話やAIエージェントのプロセスは、過去の対話履歴やLLMの処理結果が蓄積されていく仕組みになります。こうしたデータはコンテキストと呼ばれ、LLMが処理履歴や文脈を把握し、次のリクエストを適切に解決するために活用されます。こうした概念は2025年半ばから[コンテキストエンジニアリング](https://blog.langchain.com/context-engineering-for-agents/)と命名され、LLMやAIエージェント開発の重要な技術として注目されています。 他方で、過去の履歴が蓄積されることで、文脈の誤解釈や出力品質の低下が発生することがあります。今回解説する「不要な過去を忘れる」プラクティスは、意図的に対話履歴の一部または全体を破棄してコンテキストを再構成することで、LLMの出力品質を安定させる設計手法です。適切なタイミングで履歴をリセット、あるいは重要な地点まで巻き戻す（ロールバックする）ことで、誤った情報の影響を排除します。このアプローチにより、不要なコンテキストによる品質劣化を防ぎ、システムの安定性と信頼性を向上させることを目指します。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.layerx.co.jp%2Fentry%2F2025%2F11%2F14%2F0000&quot; title=&quot;AIエージェントで「不要な過去を忘れる」 - LayerX エンジニアブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/s/shibuiyusuke/20251114/20251114102756.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-11-14 10:51:11</published>
  <title>AIエージェントで「不要な過去を忘れる」</title>
  <type>rich</type>
  <url>https://tech.layerx.co.jp/entry/2025/11/14/0000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
