run-llama/llama_index · error · ValueError
Summary must be set for children indices. If the index does
Error message
Summary must be set for children indices. If the index does a summary (through index.index_struct.summary), then it must be specified with then `index_summaries` argument in this function. We will support automatically setting the summary in the future.
What it means
ComposableGraph.from_indices requires a summary for every child index because summaries become the IndexNode text used for routing queries between sub-indexes. If index_summaries is not passed, it falls back to index.index_struct.summary; any child whose summary is None raises ValueError telling you to pass index_summaries explicitly.
Source
Thrown at llama-index-core/llama_index/core/indices/composability/graph.py:63
return self._all_indices[self._root_id].index_struct
@classmethod
def from_indices(
cls,
root_index_cls: Type[BaseIndex],
children_indices: Sequence[BaseIndex],
index_summaries: Optional[Sequence[str]] = None,
storage_context: Optional[StorageContext] = None,
**kwargs: Any,
) -> "ComposableGraph": # type: ignore
"""Create composable graph using this index class as the root."""
from llama_index.core import Settings
with Settings.callback_manager.as_trace("graph_construction"):
if index_summaries is None:
for index in children_indices:
if index.index_struct.summary is None:
raise ValueError(
"Summary must be set for children indices. "
"If the index does a summary "
"(through index.index_struct.summary), then "
"it must be specified with then `index_summaries` "
"argument in this function. We will support "
"automatically setting the summary in the future."
)
index_summaries = [
index.index_struct.summary for index in children_indices
]
else:
# set summaries for each index
for index, summary in zip(children_indices, index_summaries):
index.index_struct.summary = summary
if len(children_indices) != len(index_summaries):
raise ValueError("indices and index_summaries must have same length!")
View on GitHub (pinned to afd0fef371)
Solutions
- Pass index_summaries=['summary of index 1', 'summary of index 2', ...] matching each child index in order.
- Or set the summary on each index before composing: index.index_struct.summary = '...' (then from_indices picks it up).
- Use index.as_query_engine on a single index instead if you don't actually need composition.
Example fix
# before
graph = ComposableGraph.from_indices(
TreeIndex, children_indices=[sales_idx, hr_idx], # ValueError: no summaries
)
# after
graph = ComposableGraph.from_indices(
TreeIndex,
children_indices=[sales_idx, hr_idx],
index_summaries=[
"Sales figures and quarterly revenue data",
"HR policies and employee handbook",
],
) Defensive patterns
Strategy: validation
Validate before calling
if index_summaries is None:
missing = [i for i in children_indices if i.index_struct.summary is None]
if missing:
raise ValueError(f"Pass index_summaries; {len(missing)} indices lack summaries") Prevention
- Always pass index_summaries explicitly when composing graphs.
- Store each child index's summary next to its config so they travel together.
When it happens
Trigger: Calling ComposableGraph.from_indices(GraphBuilder, indices=[idx1, idx2]) without index_summaries where one index was built without a summary; composing indexes constructed from raw nodes (which never set a summary) instead of from_documents.
Common situations: Multi-document/multi-domain composable graphs where each index covers a corpus; indexes rebuilt via insert() or loaded from storage losing their summary; assuming summaries are auto-generated.
Related errors
- indices and index_summaries must have same length!
- Max iterations of {max_iterations} reached! Either something
- All agents must have a name in a multi-agent workflow
- All agents must have a description in a multi-agent workflow
- Initial state is not supported per-agent in AgentWorkflow
AI-assisted analysis of run-llama/llama_index@afd0fef371 (2026-08-15).
Data as JSON: /api/errors/c5af0a410cb925a4.
Report an issue: GitHub.