Skip to content
EventPast event

Using embedding models to retrieve AI agent sessions to assist threat hunting

1 reports1 reporting sourcesLatest report

Start here

AI overview

Researchers at Elastic Security Labs embedded 399 Claude Code and Cursor sessions and 7,454 conversation turns over six months into Elasticsearch across four channels—user input, agent reasoning, agent replies, and tool calls—and used vector retrieval instead of having a generative model read them one by one, to conduct threat hunting on agent sessions. The authors evaluated on sessions they annotated themselves; vector retrieval had higher MRR than BM25 keyword retrieval on all four channels, with the strongest signal in the reasoning channel and the lowest in the user channel.

Generated by AI from reports · Updated 24 days ago

Progress timeline

Nov 4
  1. Elastic
    Monitoring AI agent sessions: using embedding models to assist threat hunting and attack discovery workflows

    Researchers at Elastic Security Labs embedded six months of 399 Claude Code and Cursor sessions and 7,454 conversation turns into Elasticsearch across four channels—user input, agent reasoning, agent replies, and tool calls—and used vector retrieval instead of having a generative model read them one by one, to conduct threat hunting on agent sessions. Evaluated on their own annotated sessions, vector retrieval had higher MRR than BM25 keyword retrieval on all four channels, with the strongest signal in the reasoning channel and the lowest in the user channel. Example retrieval using the original text of known malicious sessions as queries hit the most in testing, but the authors consider it better suited to finding repeated runs of the same workflow. The article also estimates the storage and embedding cost of 600 million vector representations per year for 10,000 engineers, and discusses constraints on such monitoring under UK GDPR and DPIA.

Related discussion

Total 1 items