def retrieve_contents_by_query(self, query: str, retrieve_id: str="") -> List[str]:
        """Retrieve the relevant chunk contents by the given query. The given query would be used to query both
        `_atom_store` and `_chunk_store`.

        Args:
            query (str): A query that would be used to query the vector stores.
            retrieve_id (str): id to identifying the query, could be used in logging.

        Returns:
            List[str]: The retrieved relevant chunk contents, including two kinds of chunks: the chunk retrieved
                directly from the `_chunk_store` and the corresponding source chunk linked by the atom retrieved from
                the `_atom_store`.
        """
        # Retrieve from `_chunk_store` by query to get relevant chunk directly.
        chunk_info: List[Tuple[Document, float]] = self._get_doc_with_query(query, self._chunk_store, self.retrieve_k)
        chunks = [chunk_doc.page_content for chunk_doc, _ in chunk_info]

        # Retrieve through `_atom_store` and get relevant source chunk.
        atom_infos = self.retrieve_atom_info_through_atom(queries=query, retrieve_id=retrieve_id)
        atom_source_chunks = [atom_info.source_chunk for atom_info in atom_infos]

        # Add unique source chunk to `chunks`.
        for chunk in atom_source_chunks:
            if chunk not in chunks:
                chunks.append(chunk)
        return chunks
Retrieve the relevant chunk contents by the given query. The given query would be used to query both
        `_atom_store` and `_chunk_store`.

        Args:
            query (str): A query that would be used to query the vector stores.
            retrieve_id (str): id to identifying the query, could be used in logging.

        Returns:
            List[str]: The retrieved relevant chunk contents, including two kinds of chunks: the chunk retrieved
                directly from the `_chunk_store` and the corresponding source chunk linked by the atom retrieved from
                the `_atom_store`.
        
pikerag/knowledge_retrievers/chunk_atom_retriever.py