run-llama/llama_index · error · ValueError
Missing query bundle in extra info.
Error message
Missing query bundle in extra info.
What it means
Error "Missing query bundle in extra info." thrown in run-llama/llama_index.
Source
Thrown at llama-index-core/llama_index/core/postprocessor/node_recency.py:70
@classmethod
def class_name(cls) -> str:
return "FixedRecencyPostprocessor"
def _postprocess_nodes(
self,
nodes: List[NodeWithScore],
query_bundle: Optional[QueryBundle] = None,
) -> List[NodeWithScore]:
"""Postprocess nodes."""
try:
import pandas as pd
except ImportError:
raise ImportError(
"pandas is required for this function. Please install it with `pip install pandas`."
)
if query_bundle is None:
raise ValueError("Missing query bundle in extra info.")
# sort nodes by date
node_dates = pd.to_datetime(
[node.node.metadata[self.date_key] for node in nodes]
)
sorted_node_idxs = np.flip(node_dates.argsort())
sorted_nodes = [nodes[idx] for idx in sorted_node_idxs]
return sorted_nodes[: self.top_k]
DEFAULT_QUERY_EMBEDDING_TMPL = (
"The current document is provided.\n"
"----------------\n"
"{context_str}\n"
"----------------\n"
"Given the document, we wish to find documents that contain \n"
"similar context. Note that these documents are older "View on GitHub (pinned to afd0fef371)
Solutions
- Include the query bundle in extra info when calling the recency postprocessor.
- Use the postprocessor through a query engine so the query bundle is attached automatically.
When it happens
Trigger: Thrown at llama-index-core/llama_index/core/postprocessor/node_recency.py:70 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/96e66f0022dda75c.
Report an issue: GitHub.