{"record":{"id":"ac7a4888021eb4d9","repo":"run-llama/llama_index","slug":"playground-must-have-a-nonzero-number-of-retriever","errorCode":null,"errorMessage":"Playground must have a nonzero number of retriever_modes.Initialize without the `retriever_modes` argument to use the default list.","messagePattern":"Playground must have a nonzero number of retriever_modes\\.Initialize without the `retriever_modes` argument to use the default list\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/playground/base.py","lineNumber":108,"sourceCode":"                raise ValueError(\n                    \"Every index in Playground should be an instance of BaseIndex.\"\n                )\n\n    @property\n    def indices(self) -> List[BaseIndex]:\n        \"\"\"Get Playground's indices.\"\"\"\n        return self._indices\n\n    @indices.setter\n    def indices(self, indices: List[BaseIndex]) -> None:\n        \"\"\"Set Playground's indices.\"\"\"\n        self._validate_indices(indices)\n        self._indices = indices\n\n    def _validate_modes(self, retriever_modes: INDEX_SPECIFIC_QUERY_MODES_TYPE) -> None:\n        \"\"\"Validate a list of retriever_modes.\"\"\"\n        if len(retriever_modes) == 0:\n            raise ValueError(\n                \"Playground must have a nonzero number of retriever_modes.\"\n                \"Initialize without the `retriever_modes` \"\n                \"argument to use the default list.\"\n            )\n\n    @property\n    def retriever_modes(self) -> dict:\n        \"\"\"Get Playground's indices.\"\"\"\n        return self._retriever_modes\n\n    @retriever_modes.setter\n    def retriever_modes(self, retriever_modes: INDEX_SPECIFIC_QUERY_MODES_TYPE) -> None:\n        \"\"\"Set Playground's indices.\"\"\"\n        self._validate_modes(retriever_modes)\n        self._retriever_modes = retriever_modes\n\n    def compare(\n        self, query_text: str, to_pandas: bool | None = True","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/playground/base.py#L90-L126","documentation":"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.","triggerScenarios":"Thrown at llama-index-core/llama_index/core/playground/base.py:108 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide at least one retriever mode, or omit retriever_modes to use the defaults.","Remove the empty retriever_modes argument."],"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-15T17:31:12.345Z"}