run-llama/llama_index · error · ValueError
Query bundle must be provided.
Error message
Query bundle must be provided.
What it means
Error "Query bundle must be provided." thrown in run-llama/llama_index.
Source
Thrown at llama-index-core/llama_index/core/postprocessor/rankGPT_rerank.py:63
rankgpt_rerank_prompt = rankgpt_rerank_prompt or RANKGPT_RERANK_PROMPT
super().__init__(
verbose=verbose,
llm=llm,
top_n=top_n,
rankgpt_rerank_prompt=rankgpt_rerank_prompt,
)
@classmethod
def class_name(cls) -> str:
return "RankGPTRerank"
def _postprocess_nodes(
self,
nodes: List[NodeWithScore],
query_bundle: Optional[QueryBundle] = None,
) -> List[NodeWithScore]:
if query_bundle is None:
raise ValueError("Query bundle must be provided.")
items = {
"query": query_bundle.query_str,
"hits": [{"content": node.get_content()} for node in nodes],
}
messages = self.create_permutation_instruction(item=items)
permutation = self.run_llm(messages=messages)
return self._llm_result_to_nodes(permutation, nodes, items)
async def _apostprocess_nodes(
self,
nodes: List[NodeWithScore],
query_bundle: Optional[QueryBundle] = None,
) -> List[NodeWithScore]:
if query_bundle is None:
raise ValueError("Query bundle must be provided.")
View on GitHub (pinned to afd0fef371)
Solutions
- Pass a query_bundle to the RankGPTRerank postprocessor.
- Ensure the query engine supplies the query bundle.
When it happens
Trigger: Thrown at llama-index-core/llama_index/core/postprocessor/rankGPT_rerank.py:63 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of run-llama/llama_index@afd0fef371 (2026-08-15).
Data as JSON: /api/errors/3b7ad5145efb2948.
Report an issue: GitHub.