1. The first prompt containing the question is sent to the model (step 1 of Figure 1). 2. The Adapt-LLM evaluates the prompt to determine whether additional context is necessary to answer the question effectively (step 2). 3. If the model determines that context is not required, it directly produces a response to the question by leveraging its parametric memory (step 3). 4. If context is deemed necessary, the Adapt-LLM model returns a special token, represented as \(\langle\text{RET}\rangle\), and an off-the-shelf IR system is used to retrieve pertinent context based on the question (step 4); the context is then combined with the original question prompt to form a comprehensive representation for answer generation (step 5).