{"record":{"id":"3b7ad5145efb2948","repo":"run-llama/llama_index","slug":"query-bundle-must-be-provided-3b7ad5","errorCode":null,"errorMessage":"Query bundle must be provided.","messagePattern":"Query bundle must be provided\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/postprocessor/rankGPT_rerank.py","lineNumber":63,"sourceCode":"        rankgpt_rerank_prompt = rankgpt_rerank_prompt or RANKGPT_RERANK_PROMPT\n        super().__init__(\n            verbose=verbose,\n            llm=llm,\n            top_n=top_n,\n            rankgpt_rerank_prompt=rankgpt_rerank_prompt,\n        )\n\n    @classmethod\n    def class_name(cls) -> str:\n        return \"RankGPTRerank\"\n\n    def _postprocess_nodes(\n        self,\n        nodes: List[NodeWithScore],\n        query_bundle: Optional[QueryBundle] = None,\n    ) -> List[NodeWithScore]:\n        if query_bundle is None:\n            raise ValueError(\"Query bundle must be provided.\")\n\n        items = {\n            \"query\": query_bundle.query_str,\n            \"hits\": [{\"content\": node.get_content()} for node in nodes],\n        }\n\n        messages = self.create_permutation_instruction(item=items)\n        permutation = self.run_llm(messages=messages)\n        return self._llm_result_to_nodes(permutation, nodes, items)\n\n    async def _apostprocess_nodes(\n        self,\n        nodes: List[NodeWithScore],\n        query_bundle: Optional[QueryBundle] = None,\n    ) -> List[NodeWithScore]:\n        if query_bundle is None:\n            raise ValueError(\"Query bundle must be provided.\")\n","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/postprocessor/rankGPT_rerank.py#L45-L81","documentation":"Error \"Query bundle must be provided.\" thrown in run-llama/llama_index.","triggerScenarios":"Thrown at llama-index-core/llama_index/core/postprocessor/rankGPT_rerank.py:63 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a query_bundle to the RankGPTRerank postprocessor.","Ensure the query engine supplies the query bundle."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}