async def a_categorize(self, query: str) -> str:
        """(async) Categorizes a query using the provided LLM and matrix. If no LLM is provided, the default alpha value will be used."""
        if not self.llm:
            err = "LLM is required for auto-routing. During instantiation, please provide an LLM or use direct routing."
            raise TypeError(err)

        prompt = CATEGORIZER_PROMPT.format(
            question=query, category_info=self.matrix.get_all_category_info()
        )

        response = await self.llm.acomplete(prompt)  # type: ignore
        response = str(response)

        if response not in self.matrix.get_categories():
            raise ValueError(
                f"LLM classified question in a category that is not registered. {response!s} not in {self.matrix.get_categories()}"
            )

        return response
(async) Categorizes a query using the provided LLM and matrix. If no LLM is provided, the default alpha value will be used.
llama-index-packs/llama-index-packs-koda-retriever/llama_index/packs/koda_retriever/base.py