SuperSCC.rag.SimpleRAG.update_rag_chain

SimpleRAG.update_rag_chain(model=None, api_key=None, base_url=None, prompt=None, update_similarity_search=False, search_kwargs={'k': 10})[source]

Updates components of the existing RAG chain, such as the LLM or prompt.

Parameters:
  • (str (base_url) – The name of a new LLM to use. If None, the current model is retained. Defaults to None.

  • optional) – The name of a new LLM to use. If None, the current model is retained. Defaults to None.

  • (str – A new API key for the LLM. Defaults to None.

  • optional) – A new API key for the LLM. Defaults to None.

  • (str – A new base URL for the LLM. Defaults to None.

  • optional) – A new base URL for the LLM. Defaults to None.

  • (ChatPromptTemplate (prompt) – A new prompt template to use. Defaults to None.

  • optional) – A new prompt template to use. Defaults to None.

  • (bool (update_similarity_search) – If True, the entire RAG chain, including the retriever, is rebuilt. If False, only the LLM and prompt components are updated. Defaults to False.

  • optional) – If True, the entire RAG chain, including the retriever, is rebuilt. If False, only the LLM and prompt components are updated. Defaults to False.

  • (dict (search_kwargs) – New search arguments for the retriever, effective only if update_similarity_search is True. Defaults to {“k”: 10}

  • optional) – New search arguments for the retriever, effective only if update_similarity_search is True. Defaults to {“k”: 10}