run-llama/llama_index · error · ValueError

Playground must have a nonzero number of retriever_modes.Ini

Error message

Playground must have a nonzero number of retriever_modes.Initialize without the `retriever_modes` argument to use the default list.

What it means

Error "Playground must have a nonzero number of retriever_modes.Initialize without the `retriever_modes` argument to use the default list." thrown in run-llama/llama_index.

Source

Thrown at llama-index-core/llama_index/core/playground/base.py:108

                raise ValueError(
                    "Every index in Playground should be an instance of BaseIndex."
                )

    @property
    def indices(self) -> List[BaseIndex]:
        """Get Playground's indices."""
        return self._indices

    @indices.setter
    def indices(self, indices: List[BaseIndex]) -> None:
        """Set Playground's indices."""
        self._validate_indices(indices)
        self._indices = indices

    def _validate_modes(self, retriever_modes: INDEX_SPECIFIC_QUERY_MODES_TYPE) -> None:
        """Validate a list of retriever_modes."""
        if len(retriever_modes) == 0:
            raise ValueError(
                "Playground must have a nonzero number of retriever_modes."
                "Initialize without the `retriever_modes` "
                "argument to use the default list."
            )

    @property
    def retriever_modes(self) -> dict:
        """Get Playground's indices."""
        return self._retriever_modes

    @retriever_modes.setter
    def retriever_modes(self, retriever_modes: INDEX_SPECIFIC_QUERY_MODES_TYPE) -> None:
        """Set Playground's indices."""
        self._validate_modes(retriever_modes)
        self._retriever_modes = retriever_modes

    def compare(
        self, query_text: str, to_pandas: bool | None = True

View on GitHub (pinned to afd0fef371)

Solutions

  1. Provide at least one retriever mode, or omit retriever_modes to use the defaults.
  2. Remove the empty retriever_modes argument.

When it happens

Trigger: Thrown at llama-index-core/llama_index/core/playground/base.py:108 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/ac7a4888021eb4d9. Report an issue: GitHub.