diff --git a/lambdas/inference/src/retrieval.py b/lambdas/inference/src/retrieval.py index 7596af1..1b1b123 100644 --- a/lambdas/inference/src/retrieval.py +++ b/lambdas/inference/src/retrieval.py @@ -52,8 +52,7 @@ def fetch_documents(self, query: str, top_k: int = 10): docs = self._vector_store.similarity_search_with_relevance_scores( query=query, k=top_k ) - print(f"retrieved docs: {docs}") - return [x[0] for x in docs if x[1] > self._relevance_treshold] + return [x for x in docs if x[1] > self._relevance_treshold] except Exception as e: print(f"Error while retrieving documents : {e}") raise e