{"record":{"id":"1493e82d03a69668","repo":"run-llama/llama_index","slug":"query-bundle-must-be-provided-1493e8","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/structured_llm_rerank.py","lineNumber":158,"sourceCode":"    def class_name(cls) -> str:\n        return \"StructuredLLMRerank\"\n\n    def _postprocess_nodes(\n        self,\n        nodes: List[NodeWithScore],\n        query_bundle: Optional[QueryBundle] = None,\n    ) -> List[NodeWithScore]:\n        dispatcher.event(\n            ReRankStartEvent(\n                query=query_bundle,\n                nodes=nodes,\n                top_n=self.top_n,\n                model_name=self.llm.metadata.model_name,\n            )\n        )\n\n        if query_bundle is None:\n            raise ValueError(\"Query bundle must be provided.\")\n        if len(nodes) == 0:\n            return []\n\n        initial_results: List[NodeWithScore] = []\n        with self.callback_manager.event(\n            CBEventType.RERANKING,\n            payload={\n                EventPayload.NODES: nodes,\n                EventPayload.MODEL_NAME: self.llm.metadata.model_name,\n                EventPayload.QUERY_STR: query_bundle.query_str,\n                EventPayload.TOP_K: self.top_n,\n            },\n        ) as event:\n            for idx in range(0, len(nodes), self.choice_batch_size):\n                nodes_batch = [\n                    node.node for node in nodes[idx : idx + self.choice_batch_size]\n                ]\n","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/postprocessor/structured_llm_rerank.py#L140-L176","documentation":"Error \"Query bundle must be provided.\" thrown in run-llama/llama_index.","triggerScenarios":"Thrown at llama-index-core/llama_index/core/postprocessor/structured_llm_rerank.py:158 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a query_bundle to the StructuredLLMRerank postprocessor.","Ensure the query bundle is forwarded by the calling query engine."],"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"}