class_docstr: Adaptation strategy for ranking tasks, reduced to binary ranking.
  
  For tasks that require ranking, such as information retrieval tasks,
  an instance corresponds to a single query for which documents will be
  ranked. Each reference of an instance corresponds to a single document.
  A single evaluation instance block then contains a query and a document,
  relevance of which with respect to the query will be judged by the
  model. That is, given:
  
      [input], [reference_1], ... [reference_k]
  
  We construct the following evaluation instance block:
  
      Passage: [reference_i]
      Query: [input]
      Does the passage answer the query?
      Answer: Yes | No
  
  A request consists of a single evaluation instance block and a
  number of training instance blocks. For each training instance selected,
  we add two training instance blocks, one containing a relevant passage
  and another containing a passage that's not relevant.
code: def generate_requests(
      self, eval_instance: Instance
  ) -> List[RequestState]:
      request_states = []
      request_mode = "original"
      for reference_index, reference in enumerate(
          eval_instance.references
      ):
          prompt = self.construct_prompt(
              self.train_instances,
              eval_instance,
              include_output=False,
              reference_index=reference_index,
          )
          request = Request(
              model=self.adapter_spec.model,
              prompt=prompt.text,
              num_completions=self.adapter_spec.num_outputs,
              temperature=self.adapter_spec.temperature,
              max_tokens=self.adapter_spec.max_tokens,
              stop_sequences=self.adapter_spec.stop_sequences,
              random=self.adapter_spec.random,
          )
          request_state = RequestState(
              instance=eval_instance,
              reference_index=reference_index,
              request_mode=request_mode,
              train_trial_index=self.train_trial_index,
              output_mapping=None,
              request=request,
              result=None,
              num_train_instances=prompt.num_train_instances,
              prompt_truncated=prompt.truncated,
          )
          request_states.append(request_state)
      return request_states
  
file_path: H2O/h2o_hf/helm/src/helm/benchmark/adaptation/adapters/binary_ranking_adapter.py
imports: from typing import List, Optional
  from helm.benchmark.adaptation.request_state import RequestState
  from helm.benchmark.scenarios.scenario import Instance, Reference, TRAIN_SPLIT, EVAL_SPLITS, CORRECT_TAG
  from helm.common.request import Request
  from .in_context_learning_adapter import InContextLearningAdapter
label_desc: Use image node_id 1 for calling the BinaryRankingAdapter obj's underlying member method code with example usage: obj.generate_requests(eval_instance) and returns: request_states