def _format_prompt(
        self, choices: Sequence[ToolMetadata], query: QueryBundle
    ) -> str:
        """
        A system prompt for selection is created when instantiating the parent LLMSingleSelector class.
        This method formats the prompt into a str so that it can be serialized for the NotDiamond API.
        """
        context_list = _build_choices_text(choices)
        return self._prompt.format(
            num_choices=len(choices),
            context_list=context_list,
            query_str=query.query_str,
        )

        A system prompt for selection is created when instantiating the parent LLMSingleSelector class.
        This method formats the prompt into a str so that it can be serialized for the NotDiamond API.
        
llama-index-integrations/selectors/llama-index-selectors-notdiamond/llama_index/selectors/notdiamond/base.py