class_docstr: Solver for MMLU, adapts its strategy based off the parameters
  passed at initialization. Generalized for both LMs and humans
docstr: Add the most recent question and models answer to memory. If we're using a
  scratchpad, then add the relevant system messages and models private messages
docstr_tok: ["Add","the","most","recent","question","and","models","answer","to","memory",".","If","we","'re","using","a","scratchpad",",","then","add","the","relevant","system","messages","and","models","private","messages"]
code: def _add_ans_to_memory(self, prompt: Sequence[Dict], response: str):
      """
      Add the most recent question and models answer to memory. If we're using a
      scratchpad, then add the relevant system messages and models private messages
      """
      if self.scratchpad:
          # Add (question, scratch system prompt, scratch, question system propmt)
          self.prev_ans += prompt[-4:]
      else:
          self.prev_ans += prompt[-1:]  # Add (question)
      self.prev_ans += [{"role": "assistant", "content": response}]
  
imports: import os
  from abc import abstractmethod
  from typing import Any, Dict, Sequence
  from evals.completion_fns.openai import OpenAIChatCompletionFn
  from evals.elsuite.sandbagging.defaults import SANDBAGGING_IMPROVED_GPT_4, SANDBAGGING_IMPROVED_GPT_35, SANDBAGGING_SIMPLE, SANDBAGGING_SUBSET_SIMPLE, SCRATCHPAD_MSG, SCRATCHPAD_QUESTION_MSG
  from evals.solvers.solver import Solver, SolverResult
  from evals.task_state import TaskState
label_desc: Use image node_id 6 for calling the StrategySolver obj's underlying member method code with example usage: obj._add_ans_to_memory(prompt, response) without return types