LMLineage: Content Lineage and Context Governance for LLM Agents
Abstract
Interpretability for AI agents should not be confined to understanding the model's internal weights. It must also cover the agent's reasoning and decision-making process over multi-source context. We present LMLineage, an out-of-band system that attributes every output sentence of an agent session to its supporting input spans with calibrated confidences, without requiring white-box access to the model or any additional inference passes. On top of the lineage metadata, we build concept-drift micro compaction: instead of waiting for the context-length limit and summarizing everything, the system detects when previously used input documents have stopped being referenced ("drifted") and surgically compacts only those, preserving user instructions verbatim. We evaluate on a multi-tier corpus: 71 gold annotated sentences from 10 Chinese web-QA cases, plus 90 turns of independently collected multi-turn sessions across three generator models (gpt-4o-mini, qwen3.8-27b, deepseek-v4-flash). Results show that (i) window-level embedding similarity is far better aligned with LLM paraphrasing than whole document or lexical matching; (ii) the greedy-window fast path is both faster and more accurate on average than exhaustive line-matching (a multiple-comparisons bias in the latter inflates web recall at the cost of overall accuracy); (iii) per-turn attribution completes in 1s on a single GPU, remaining stable as context accumulates to 40 turns; and (iv) concept-drift detection is conservative (0% false compaction) with recall bounded by attribution accuracy. We further describe the concept-drift micro compaction design and an interactive incident-tracing/memory-cleaning case study. A companion patent application covers the lineage construction method.
Create a lesson
Related papers
Keep the Process, Change the Supplier: Runtime Governance for Tool-Using AI Agents
Shared title terminology · Deepak Waghmare, Shaad Sufi
CompAct-Bench: A Benchmark for Working-Context Compaction in Long-Horizon Agent Tasks
Shared title terminology · Jiayi Chen, Lizhe Chen, Yujia Chen et al.
Semantic Context Handoff with On-Demand Evidence for Long-Horizon Agents
Shared title terminology · Guolong Zheng, Chen Hou, Xu Yang et al.
Context Has a Price: Adding and Removing Context for LLM Coding Agents under Prefix Caching
Shared title terminology · Zerui Yang, Miaomiao Dong, Quan Xue et al.
Not All Evidence Is Admissible: Evidence Governance for Tool-Augmented Medical Agents
Shared title terminology · Runxun Zhang, Onofrio Antonio Catalano, Jinqiao Wang et al.
RegimeCouncil: Paired-Evidence Routing For Memory Conflict Governance In LLM Agents
Shared title terminology · Qingcan Kang, Mingyang Liu, Shixiong Kai et al.