# if show_results.__len__() == 0:
        #    return results
        scores: List[float] = []
        retrieval_docs = self.similarity_search_by_vector(embedding, k, scores)
        L2_Norm = 0.0
        for score in scores:
            L2_Norm = L2_Norm + score * score
        L2_Norm = pow(L2_Norm, 0.5)
        doc_no = 0
        for doc in retrieval_docs:
            doc_tuple = (doc, 1 - (scores[doc_no] / L2_Norm))
            results.append(doc_tuple)
            doc_no = doc_no + 1
        return results
[docs]    def similarity_search_with_relevance_scores(
        self,
        query: str,
        k: int = DEFAULT_TOPN,
        **kwargs: Any,
    ) -> List[Tuple[Document, float]]:
        """Return docs and relevance scores, normalized on a scale from 0 to 1.
        0 is dissimilar, 1 is most similar.
        """
        if self.awadb_client is None:
            raise ValueError("AwaDB client is None!!!")
        embedding = None
        if self.embedding_model is not None:
            embedding = self.embedding_model.embed_query(query)
        show_results = self.awadb_client.Search(embedding, k)
        results: List[Tuple[Document, float]] = []
        if show_results.__len__() == 0:
            return results
        scores: List[float] = []
        retrieval_docs = self.similarity_search_by_vector(embedding, k, scores)
        L2_Norm = 0.0
        for score in scores:
            L2_Norm = L2_Norm + score * score
rtdocs_stable/api.python.langchain.com/en/stable/_modules/langchain/vectorstores/awadb.html