Langchain.
embdeddings_filter = EmbeddingsFilter(embeddings=embeddings) compression_retriever_filter = ContextualCompressionRetriever(base_retriever=retriever, base_compressor=embdeddings_filter) # compressed_docs = compression_retriever_filter.get_relevant_documents(query="What is Group Life Insurance?")