 By crafting input that exploits the recursive behavior of the LLM, the attacker forces the model to repeatedly expand and process the context window, consuming significant computational resources.  This attack strains the system and may lead to a DoS condition, making the LLM unresponsive or causing it to crash An attacker floods the LLM with a large volume of variable-length inputs, carefully crafted to approach or reach the context window's limit.  By overwhelming the LLM with inputs of varying lengths, the attacker aims to exploit any inefficiencies in processing variable-length inputs.  This flood of inputs puts excessive load on the LLM's resources, potentially causing performance degradation and hindering the system's ability to respond to legitimate requests.  How to Prevent Implement input validation and sanitization to ensure user input adheres to defined limits and filters out any malicious content Cap resource use per request or step, so that requests involving complex parts execute more slowly Enforce API rate limits to restrict the number of requests an individual user or IP address can make within a specific timeframe Limit the number of queued actions and the number of total actions in a system reacting to LLM responses Continuously monitor the resource utilization of the LLM to identify abnormal spikes or patterns that may indicate a DoS attack