class_docstr: A class for using a RAG model for question answering
class_docstr_tok: ["A","class","for","using","a","RAG","model","for","question","answering"]
code: def summarize_context(
      self, combined_context: str, question: str
  ) -> str:
      summarization_prompt_template = (
          self.args.summarization_prompt_template
      )
  
      summarization_prompt = summarization_prompt_template.format(
          context=combined_context, question=question
      )
  
      summarized_context = self.llm(prompt=summarization_prompt)
  
      return self.prompt_template.format(
          question=question,
          context=self.extract_generated_text(summarized_context),
      )
  
file_path: mindsdb/mindsdb/integrations/handlers/rag_handler/rag.py
imports: import json
  from collections import defaultdict
  from typing import List
  from mindsdb.integrations.handlers.rag_handler.settings import LLMLoader, PersistedVectorStoreLoader, PersistedVectorStoreLoaderConfig, RAGBaseParameters, RAGHandlerParameters, load_embeddings_model
  from mindsdb.utilities import log
label_desc: Use image node_id 4 for calling the RAGQuestionAnswerer obj's underlying member method code with example usage: obj.summarize_context(combined_context, question) and returns: self