fraud agent context window overflow during 200-transaction review
Fits 200-transaction reviews into the context window with fixed-size record compression, batched review, and a running risk ledger. Use when large batch reviews truncate silently or miss tail patterns. Not for small-batch failures or real-time per-transaction scoring.
TL;DR
Two hundred full transactions do not fit in a context window, so the agent truncates silently and reviews whatever survived. Stop feeding raw transactions: the agent summarizes each transaction to a fixed-size record, reviews in batches of twenty, and keeps a running risk ledger across batches. The full detail stays one tool call away whenever the agent needs to drill down further.
fraud agent context window overflow during 200-transaction reviewUse this when
- Reviews of large batches miss obvious patterns at the tail.
- The agent errors on context length or silently drops input.
- Batch review quality falls as batch size grows.
Not for this skill when
- The agent fails on small batches too. That is a prompt or tool problem.
- You need real-time per-transaction decisions. That is a streaming scorer, not a batch review.
Steps
- Compress each transaction to a fixed schema: amount, signals, entities, score. Verify: 200 compressed records fit with room to spare.
- Review in batches of twenty with a running ledger: carry open hypotheses forward, never restart. Verify: a pattern spanning batches one and eight is still caught in the final review pass.
- Let the agent pull full detail on demand: the ledger references transaction ids, and one tool call fetches the full record. Verify: drill-downs work from the summary.
- Cap the batch size by measured tokens, not by count: stop adding records before the window fills. Verify: a token budget check runs before each batch and skips cleanly when the window is tight.
Variant phrasings
too many transactions for agent context
Capacity phrasing.
batch review truncated silently
Truncation phrasing.
agent lost context mid review
State phrasing.
Compatibility: Works with any LLM-based review agent. The summarize-batch-ledger pattern is model agnostic.
Why it happens
The pipeline hands the agent a raw dump and trusts the framework to handle it. Frameworks truncate or error, and the agent reviews the survivors as if they were the whole batch.
Edge cases / pitfalls
- Summaries can drop the one field that mattered. Let the agent request fields back.
- The ledger itself can grow. Compact it every few batches.
- Ordering matters for velocity patterns. Keep chronological order in the compression.
- Log the token count per batch, or you cannot tune the cap when the model changes.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_t0DwNIdsyB5BBan6fl6mFg