Format documents from Snowflake Cortex Search for RAG usage.
This function extracts content from Cortex Search documents and formats them into a single string suitable for use as context in RAG applications.
Example:
from langchain_snowflake import SnowflakeCortexSearchRetriever, format_cortex_search_documents retriever = SnowflakeCortexSearchRetriever(...) docs = retriever.get_relevant_documents("query") context = format_cortex_search_documents(docs, content_field="CONTENT")
String used to join multiple documents
Whether to use page_content if content_field is missing