Join our Newsletter — 33% off our NHI Course

Notifications
Clear all

AI agents and grounded context: can graphs replace repeated code reads?


(@nhi-mgmt-group)
Member Moderator
Joined: 1 year ago
Posts: 17031
Topic starter  

TL;DR: Using a Data Fabric through MCP cut token use by roughly two-thirds, reduced cost by about 10.6x, and made answers more consistent across repeated security and architecture questions, according to Apiiro. The finding matters because agentic programmes break when every invocation reconstructs context from scratch instead of reusing grounded system knowledge.

NHIMG editorial — based on content published by Apiiro: grounded context for AI agents and the Data Fabric benchmark

By the numbers:

Questions worth separating out

Q: How should security teams reduce the cost of AI agents that keep rereading the same systems?

A: Use a shared, governed context layer so agents retrieve application and risk knowledge once instead of reconstructing it on every invocation.

Q: Why do AI agents become harder to govern as they scale across more repositories?

A: Because every additional repository multiplies the amount of context the agent must rediscover, which increases cost, latency, and output variance.

Q: What breaks when agents rebuild context from source code each time?

A: Answer stability breaks first, followed by budget predictability and auditability.

Practitioner guidance

  • Inventory the questions agents answer repeatedly Map the security, architecture, and compliance questions that are asked across repos, pipelines, and review workflows.
  • Separate retrieval from reasoning Design agent workflows so the expensive part is once-only context creation, while the model focuses on interpretation and next-step decisions.
  • Govern MCP access as a data path Treat Model Context Protocol integrations as privileged connections into authoritative systems, not as informal shortcuts.

What's in the full article

Apiiro's full article covers the operational detail this post intentionally leaves for the source:

  • The full benchmark table showing cost, token, and runtime deltas across the 10-question proof of value.
  • The description of how the Software Graph and Risk Graph are constructed and kept current across commits.
  • The MCP-based retrieval pattern used to let agents query precomputed context instead of rereading source code.
  • The example security and architecture questions that were used to test the system across repositories.

👉 Read Apiiro's analysis of grounded context for AI agents →

AI agents and grounded context: can graphs replace repeated code reads?

Explore further

View Full Forum →  |  NHI Foundation Course →



   
Quote
(@mr-nhi)
Member Moderator
Joined: 3 months ago
Posts: 16618
 

Grounded context is becoming a governance control, not just an efficiency tactic. The article's core finding is that agents become economically and operationally unstable when they reconstruct context on every query. That creates a governance problem because consistency, auditability, and cost predictability all degrade at the same time. For security programmes, the important shift is to treat shared context as infrastructure that enables control, not a convenience layer.

A question worth separating out:

Q: How do organisations know whether their AI context layer is working?

A: They should test whether the system consistently retrieves current, governed and policy-approved sources rather than merely relevant ones. Strong signals include fewer stale answers, fewer policy exceptions, and higher agreement between business definitions and model outputs. If the model still guesses when context is missing, the layer is incomplete.

👉 Read our full editorial: Grounded context cuts AI agent cost and improves answer consistency



   
ReplyQuote
Share: