def _retrieve(self, query_bundle: QueryBundle) -> t.List[NodeWithScore]:
        """
        Retrieves.

        Args:
            query_bundle (QueryBundle): query bundle

        Returns:
            t.List[NodeWithScore]: nodes with scores

        """
        # make query
        query_embedding = self._embed_model.get_query_embedding(query_bundle.query_str)
        vector_store_query = VectorStoreQuery(
            query_embedding=query_embedding, similarity_top_k=500
        )

        # query for answer
        query_res = self._vec_store.query(vector_store_query)

        # determine top parents of most similar children (these are long retrieval units)
        top_parents_set: t.Set[str] = set()
        top_parents: t.List[NodeWithScore] = []
        for id_, similarity in zip(query_res.ids, query_res.similarities):
            cur_node = self._small_toks_dict[id_]
            parent_id = cur_node.ref_doc_id
            if parent_id not in top_parents_set:
                top_parents_set.add(parent_id)

                parent_node = self._grouped_nodes_dict[parent_id]
                node_with_score = NodeWithScore(node=parent_node, score=similarity)
                top_parents.append(node_with_score)

                if len(top_parents_set) >= self._similarity_top_k:
                    break

        assert len(top_parents) == min(self._similarity_top_k, len(self._grouped_nodes))

        return top_parents

        Retrieves.

        Args:
            query_bundle (QueryBundle): query bundle

        Returns:
            t.List[NodeWithScore]: nodes with scores

        
llama-index-packs/llama-index-packs-longrag/llama_index/packs/longrag/base.py