def _retrieve(self, query_bundle: QueryBundle) -> List[NodeWithScore]:
        """llama-index compatible retrieve method that auto-determines the optimal alpha for a query and then retrieves results for a query."""
        if not self.llm:
            warning = f"LLM is not provided, skipping route categorization. Default alpha of {self.default_alpha} will be used."
            logging.warning(warning)

            results = self.retriever.retrieve(query_bundle)
        else:
            category = self.categorize(query=query_bundle.query_str)  # type: ignore
            results = self.category_retrieve(category, query_bundle)
            if self.verbose:
                logging.info(
                    f"Query categorized as {category} with alpha of {self.matrix.get_alpha(category)}"
                )

        if self.reranker:
            if self.verbose:
                logging.info("Reranking results")
            results = self.reranker.postprocess_nodes(
                nodes=results, query_bundle=query_bundle
            )

        return results
llama-index compatible retrieve method that auto-determines the optimal alpha for a query and then retrieves results for a query.
llama-index-packs/llama-index-packs-koda-retriever/llama_index/packs/koda_retriever/base.py