def CURATED_FEW_SHOT_COT_PROMPT()

in nl2sql/tasks/join_selection/core.py [0:0]


    def CURATED_FEW_SHOT_COT_PROMPT(self) -> _CoreJoinSelectorPrompt:
        prompt_template = FewShotPrompts.TASK_JOIN_SELECTION_CORE_V1_SPIDER_V1.partial(
            format_instructions=self.default_parser.get_format_instructions()
        )
        prompt_template.example_prompt = prompt_template.example_prompt.partial(  # type: ignore
            format_instructions=self.default_parser.get_format_instructions()
        )
        return _CoreJoinSelectorPrompt(
            prompt_id="TASK_JOIN_SELECTION_CORE_V1_SPIDER_V1",
            prompt_template=prompt_template,
            parser=self.default_parser,
            post_processor=lambda x: [i.strip().replace(" ", "") for i in x["joins"]]
            if (x and isinstance(x.get("joins"), list))
            else [],
        )