snowflake.cortex.extract_answer

snowflake.cortex.extract_answer(from_text: str | Column, question: str | Column, session: Session | None = None) str | Column

Calls into the LLM inference service to extract an answer from within specified text.

Parameters:
  • from_text – A Column of strings representing input text.

  • question – A Column of strings representing a question to ask against from_text.

  • session – The snowpark session to use. Will be inferred by context if not specified.

Returns:

A column of strings containing answers.