class_docstr: A base class for the Indices encapsulated by the [`RagRetriever`].
class_docstr_tok: ["A","base","class","for","the","Indices","encapsulated","by","the","[","`","RagRetriever","`","]","."]
docstr: For each query in the batch, retrieves `n_docs` documents.
  
  Args:
      question_hidden_states (`np.ndarray` of shape `(batch_size, vector_size)`):
          An array of query vectors.
      n_docs (`int`):
          The number of docs retrieved per query.
  
  Returns:
      `np.ndarray` of shape `(batch_size, n_docs)`: A tensor of indices of retrieved documents. `np.ndarray` of
      shape `(batch_size, vector_size)`: A tensor of vector representations of retrieved documents.
code: def get_top_docs(
      self, question_hidden_states: np.ndarray, n_docs=5
  ) -> Tuple[np.ndarray, np.ndarray]:
      """
      For each query in the batch, retrieves `n_docs` documents.
  
      Args:
          question_hidden_states (`np.ndarray` of shape `(batch_size, vector_size)`):
              An array of query vectors.
          n_docs (`int`):
              The number of docs retrieved per query.
  
      Returns:
          `np.ndarray` of shape `(batch_size, n_docs)`: A tensor of indices of retrieved documents. `np.ndarray` of
          shape `(batch_size, vector_size)`: A tensor of vector representations of retrieved documents.
      """
      raise NotImplementedError
  
imports: import os
  import pickle
  import time
  from typing import Iterable, List, Optional, Tuple
  import numpy
  from ...tokenization_utils import PreTrainedTokenizer
  from ...tokenization_utils_base import BatchEncoding
  from ...utils import cached_file, is_datasets_available, is_faiss_available, logging, requires_backends
  from .configuration_rag import RagConfig
  from .tokenization_rag import RagTokenizer
label_desc: Use image node_id 2 for calling the Index obj's underlying member method code with example usage: obj.get_top_docs(question_hidden_states, n_docs) without return types