This repository shows you how to build an LLM using Snowflake's API.

-
Clone this repo.
-
Sign up for an account here. Activate your account and you should see a welcome screen.
-
Go to
Projects
->Worksheets
-> ClickCreate SQL Worksheet
-
Copy and paste the entire setup.sql into the worksheet and hit run. It might take a couple of minutes for Step 9 to finish! You should see the following response:
Stage area MODELS successfully created.
-
Go to
Data
->Add Data
-> ClickLoad files into a Stage
. -
Upload the
sales_metrics_model.yaml
file. Make sure to selectSALES_INTELLIGENCE.DATA
as your database + schema andMODELS
as your 'Stage'.

-
Create a folder called
.streamlit
and a file calledsecrets.toml
inside. -
Click on your name in the bottom left corner, and select
Connect a tool to Snowflake
. Use the dialog to fill out your information, replacing values in[]
like so:
[snowflake]
account = "[Account Identifier]"
user = "[User Name]"
password = "[Same as when you signed up. Be careful here and don't check this in to GitHub!"
role = "[Role]"
host = "[Account/Server URL]"
-
Run
pip install -r requirements.txt
to make sure you have all the dependencies working. -
Run
streamlit run streamlit.app
and you should see a chat assistant ready to work with you! Try a few prompts:
- "What was the total sales volume last year?" should output a SQL query and an interpretation of your request.
- "Summarize the call with TechCorp Inc" should give you a summary of the call transcript.