• 3 min read

Ecosystem Change Intelligence

A multi-agent pipeline that watches Android security feeds, finds what changed, and writes action tickets that cite their evidence.

PythonLLM agentsRAGpgvectorNetworkXNext.js

What it is

ECI watches the Android security ecosystem: security bulletins, Play Integrity API docs, the CISA list of known exploited vulnerabilities and developer policy updates. It finds what actually changed between snapshots, links changes across sources with a knowledge graph, and uses two LLM agents to triage risk and write recommendations. I built it against a fraud-operations workflow developed with TransUnion.

Most monitoring tools hand analysts raw diffs. ECI writes an action ticket instead, with a risk score, a suggested owner, an urgency level and citations back to the evidence, so it can go straight into a triage queue.

How it works

  • Ingest fetches 10 live sources and hashes each snapshot with SHA-256, so a re-fetch only registers real changes.
  • Diff pulls out added and deleted spans with difflib and drops cosmetic changes like whitespace and formatting.
  • Embed chunks and embeds only the changed text, so the vector index isn’t diluted by unchanged background text.
  • The knowledge graph comes from regex entity extraction (CVEs, API levels, permissions, policy clauses) with typed edges such as affects, deprecates and supersedes.
  • The Sentinel agent scores each change from 0 to 10 and drops anything below the threshold, so the Coordinator never sees noise.
  • The Coordinator agent runs DeltaRAG and writes the ticket.

Both agents use llama-3.1-8b-instant on Groq, picked for sub-second latency. Every response must pass json.loads() and a Pydantic schema with no cleanup afterwards. Getting an 8B model to do that every time took a pinned analyst role, the full schema in the prompt with per-field constraints, few-shot examples of relevant and irrelevant changes, and numbered evidence blocks that the Coordinator must cite by id.

DeltaRAG runs vector search over the change chunks next to a 2-hop graph traversal and fuses the two ranked lists with Reciprocal Rank Fusion (k = 60). I chose RRF because a chunk that vector search ranks highly keeps its score even when the graph has no path to it. The graph can lift results but can’t drag them below the vector baseline.

Results

100 fixed benchmark queries (85 scored, 10 query types), top-5 retrieval. Significance uses paired Wilcoxon tests with Holm-Bonferroni correction and 95% bootstrap intervals.

VariantP@1P@5R@5nDCG@5MRR
Vector only0.8470.5040.9310.8770.913
Graph only0.6350.3410.5710.5870.639
DeltaRAG0.8820.4780.8990.8730.930

DeltaRAG is a trade. It ranks the right result first more often and ties on nDCG@5 (p = 0.43), but gives back some depth-5 recall (0.899 vs 0.931, p = 0.014). An analyst acts on the first result, so I took that trade. The graph helps most on policy, change-over-time and noisy queries, where a shared identifier links two sources that share no vocabulary.

Graph-only does badly because the regex extractor finds nothing in free-text queries, so the traversal has no starting node. Better extraction with an LLM is the top item for future work. All three variants rejected every out-of-scope query.

I wrote it up as a paper, “From Deltas to Decisions: DeltaRAG and Ecosystem Change Intelligence for Digital Risk Monitoring”, with a failure analysis and sensitivity sweeps.

Stack

Python 3.11, Groq (llama-3.1-8b-instant), nomic-embed-text v1.5 run locally, Supabase Postgres with pgvector (HNSW), NetworkX, Next.js 14 dashboard, uv.

Back to top