xtrace_sdk.retrievers.simple_retriever ====================================== .. py:module:: xtrace_sdk.retrievers.simple_retriever Classes ------- .. autoapisummary:: xtrace_sdk.retrievers.simple_retriever.SimpleRetriever Module Contents --------------- .. py:class:: SimpleRetriever(execution_context, integration) Bases: :py:obj:`xtrace_sdk.retrievers.base.RetrieverBase` This class is a simple retriever that uses hamming distance to find the most similar context data. :param RetrieverBase: abstract base class for retrievers :type RetrieverBase: class .. py:attribute:: execution_context .. py:attribute:: integration .. py:method:: nn_search_for_ids(query_vector, k = 3, include_scores = False, **kwargs) :async: Given an encrypted prompt, return the k most similar encrypted contexts. :param prompt: encrypted prompt :type prompt: ciphertext :param k: the number of most similar context data to return, defaults to 3 :type k: int, optional .. py:method:: nn_search_for_ids_bench(query_vector, k = 3, **kwargs) :async: .. py:method:: retrieve_and_decrypt(chunk_ids, **kwargs) :async: Given a list of chunk ids, return the decrypted contexts. :param chunk_ids: list of chunk ids :type chunk_ids: list[str]