in nl2sql/tasks/column_selection/core.py [0:0]
def CURATED_FEW_SHOT_COT_PROMPT(self) -> _CoreColumnSelectorPrompt:
prompt_template = (
FewShotPrompts.TASK_COLUMN_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 _CoreColumnSelectorPrompt(
prompt_id="TASK_COLUMN_SELECTION_CORE_V1_SPIDER_V1",
prompt_template=prompt_template,
parser=self.default_parser,
post_processor=lambda x: [i.strip() for i in x["columns"]]
if (x and isinstance(x.get("columns"), list))
else [],
)