{"record":{"id":"94128aefa471bcef","repo":"run-llama/llama_index","slug":"at-least-one-item-in-inputs-list-must-be-provided","errorCode":null,"errorMessage":"At least one item in inputs_list must be provided.","messagePattern":"At least one item in inputs_list must be provided\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"llama-index-core/llama_index/core/evaluation/batch_runner.py","lineNumber":132,"sourceCode":"        *inputs_list: Any,\n    ) -> List[Any]:\n        \"\"\"\n        Validate and clean input lists.\n\n        Enforce that at least one of the inputs is not None.\n        Make sure that all inputs have the same length.\n        Make sure that None inputs are replaced with [None] * len(inputs).\n\n        \"\"\"\n        assert len(inputs_list) > 0\n        # first, make sure at least one of queries or response_strs is not None\n        input_len: Optional[int] = None\n        for inputs in inputs_list:\n            if inputs is not None:\n                input_len = len(inputs)\n                break\n        if input_len is None:\n            raise ValueError(\"At least one item in inputs_list must be provided.\")\n\n        new_inputs_list = []\n        for inputs in inputs_list:\n            if inputs is None:\n                new_inputs_list.append([None] * input_len)\n            else:\n                if len(inputs) != input_len:\n                    raise ValueError(\"All inputs must have the same length.\")\n                new_inputs_list.append(inputs)\n        return new_inputs_list\n\n    def _validate_nested_eval_kwargs_types(\n        self, eval_kwargs_lists: Dict[str, Any]\n    ) -> Dict[str, Any]:\n        \"\"\"\n        Ensure eval kwargs are acceptable format.\n            either a Dict[str, List] or a Dict[str, Dict[str, List]].\n","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/run-llama/llama_index/blob/afd0fef371831f9bda13e5af7167cf4e981278ab/llama-index-core/llama_index/core/evaluation/batch_runner.py#L114-L150","documentation":"Raised by BatchRunner._validate_and_clean_inputs when inputs_list contains no lists, or every element is None. The method first asserts the list itself is non-empty (an empty list instead fails the bare assert), then scans for the first non-None input to determine the shared length; if none exists there is nothing to evaluate against.","triggerScenarios":"Passing eval_kwargs lists where every value is None, e.g. await runner.aevaluate_responses(queries=qs, responses=rs, references=None), or an empty list [] as a kwargs value. Also triggered by aevaluate when all eval kwargs are None.","commonSituations":"Forwarding optional per-evaluator kwargs (like references) that a given evaluator does not need, set to None instead of a list; programmatically building kwargs dicts where a variable defaults to None; mixing evaluators that take references with ones that do not.","solutions":["Pass a real list for at least one kwarg (and None for the others): e.g. references=[ref] * len(queries).","If a kwarg is genuinely unused by all evaluators, omit it entirely from the call instead of passing None.","Check that you are not passing an empty list [] — either use a populated list or drop the argument (empty lists fail the preceding assert len(inputs_list) > 0)."],"exampleFix":"# before\nawait runner.aevaluate_responses(\n    queries=queries, responses=responses, references=None\n)\n\n# after\nawait runner.aevaluate_responses(\n    queries=queries, responses=responses,\n    references=[None] * len(queries),  # or omit entirely\n)","handlingStrategy":"validation","validationCode":"def check_batch_inputs(queries, responses, **kwargs_lists):\n    lists = [queries, responses, *kwargs_lists.values()]\n    if all(x is None for x in lists):\n        raise ValueError(\"no evaluation inputs provided\")\n    return True","typeGuard":"def has_at_least_one_list(lists) -> bool:\n    return any(x is not None and len(x) > 0 for x in lists)","tryCatchPattern":null,"preventionTips":["Never pass None as an eval-kwarg value; omit it or use a [None]*len(queries) list.","Centralize batch-evaluation calls behind one helper that validates the kwargs shape first."],"tags":["batch-evaluation","input-validation","llama-index"],"backgroundTag":null,"analyzedSha":"afd0fef371831f9bda13e5af7167cf4e981278ab","analyzedAt":"2026-08-15T05:42:58.429Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}