This repository contains example usage of Cortex Search, currently in Private Preview. The official preview documentation can be found here.
The examples
directory showcases several Cortex Search usage patterns. Navigate to each of the following subdirectories for installation information and sample usage for the method of choice:
- examples/python_sdk for usage via the
snowflake
python package.- concurrent_example.py calling Cortex Search serially from a Python client with high concurrency for "batch" use-cases
- examples/rest for usage by hitting the REST API directly via python or the command line, using RSA key pair authentication with a JWT token.
- examples/streamlit-ai-search searching for documents in a streamlit application with Cortex Search as the search backend.
- examples/streamlit-chat end-to-end RAG chatbot in Streamlit-in-Snowflake using Cortex LLM functions for chat response generation and Cortex Search for retrieval.
- examples/sql examples calling Cortex Search from a SQL environment (e.g., Snowflake Worksheet)
- examples/sql calling Cortex Search from a SQL SProc with high concurrency for "batch" use-cases, e.g., on a with a Snowflake table containing a column of query values
Apache Version 2.0