Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cortex Code Quiz App - Snowsight edition

A browser-only asset for building a Streamlit-in-Snowflake certification quiz app with Cortex Code in Snowsight (GA since 2026-03-09). Load a study guide PDF, and the agent creates the schema, extracts exam domains, generates questions, builds quiz.py, and deploys. All from a single chat session, zero local tooling.

Baseline exam: SnowPro Core COF-C03. Swappable to any Snowflake certification by re-running /setup-exam with a different study guide PDF.


what you get

  • A two-page Streamlit app:
    • Quiz - configure round, answer single-/multi-select questions, see score + pass/fail (75% threshold) with wrong-answer cards.
    • Review - filterable history of every mistake + learning dashboard (score trend, per-domain error distribution, session history).
  • AI-grounded content: domains and key facts come from the official study guide PDF (AI_PARSE_DOCUMENT); questions are either AI-generated at runtime (AI_COMPLETE), pre-generated into a question bank, or imported from CSV/json file.
  • Persistent progress across sessions via QUIZ_SESSION_LOG + QUIZ_REVIEW_LOG - the app remembers your weak domains between logins.
  • Schema-per-exam isolation (QUIZ_<EXAM_CODE>) so multiple certifications coexist in one database.
  • custom Cortex Code skills* in .snowflake/cortex/skills/ drive the whole pipeline end to end.
  • Optional add-ons: spaced repetition, flashcards, exam-simulation mode, achievement badges, AI study recommendations ($quiz/features).

what is different from the CLI version

CLI variant Snowsight variant (this branch)
environment terminal + snow CLI + bash browser workspace, zero local tooling
file uploads snow stage copy manual upload via Snowsight UI
isolation git branch per exam + schema (agent-automated) schema per exam always; optional branch per exam if workspace is Git-backed (user creates the branch manually)
custom skills path .cortex/skills/ .snowflake/cortex/skills/
global skills ~/.snowflake/cortex/skills/ built into Cortex Code
quiz.py, environment.yml tracked in repo generated by agent, not committed
input data (data/) tracked in repo user uploads PDF/CSV directly to stage

prerequisites

  • Snowflake account with a role that has USAGE+CREATE SCHEMA on a database, USAGE on a warehouse, and access to Cortex AI functions.
  • one-time as ACCOUNTADMIN (EU accounts only): ALTER ACCOUNT SET CORTEX_ENABLED_CROSS_REGION = 'AWS_US';
  • Snowsight > AI & ML > Agents > Settings > Tools and connectors > Web search > enable.
  • a study guide PDF for your target exam - Snowflake certifications catalog.

disclaimer

AI-generated questions and explanations may be inaccurate - LLMs hallucinate, especially on niche Snowflake features. Verify against official Snowflake docs when in doubt.

When AI question generation or AI explanations are enabled, the app runs slower a little bit: each question is a live AI_COMPLETE round-trip. You can switch to a faster model (see docs/customization.md if present, or edit cortex llm in AGENTS.md) at the cost of quality and more hallucinations.


getting started

first time in Snowsight or with Cortex Code?docs/instructions-detailed.md

already comfortable?docs/instructions.md

then paste the prompt from docs/prompts.md into the Cortex Code chat.

two ways to load this asset into a workspace

  • via Git integration (recommended): fork this repo on GitHub, register it in Snowflake (CREATE API INTEGRATION + CREATE GIT REPOSITORY), then Projects > Workspaces > + Workspace > From Git repository. Workspace opens with the full tree in place - skills, AGENTS.md, and docs/ all accessible from the Snowsight file browser. You also get version control: edits to skills / AGENTS.md / generated quiz.py can be committed back to your fork from inside Snowsight.
  • via manual upload (fallback, fully offline-capable): clone the repo locally, then in Snowsight create an empty workspace and drag-drop .snowflake/cortex/skills/ and AGENTS.md into it via the Cortex Code UI. docs/ stays on your local clone - no in-browser access.

See docs/instructions-detailed.md step 2 for the DDL snippets and walk-through. Canonical Snowflake docs: Integrate workspaces with a Git repository and Using a Git repository in Snowflake.


repo structure

coco-quiz-app
├── README.md                         
├── AGENTS.md                         -- Cortex Code context (read, but do not restructure)
├── .snowflake/cortex/skills/         -- custom project skills (upload to workspace)
│   ├── setup-exam                    -- 10-step end-to-end pipeline
│   ├── adapt-questions               -- optional CSV/JSON question-bank import
│   ├── cortex/                       -- Cortex AI patterns + prompt audit
│   ├── sis/                          -- Streamlit-in-Snowflake patterns + 22-item pre-deploy scan
│   └── quiz/                         -- screens, questions, style, optional features
└── docs/
    ├── instructions.md               -- concise step-by-step
    ├── instructions-detailed.md      -- detailed walk-through with Snowsight UI paths
    ├── prompts.md                    -- the prompt to paste into Cortex Code chat
    ├── skills.md                     -- one-paragraph description per skill
    ├── customization.md              -- model, UI, features, cross-provider exam swap
    ├── architecture.md               -- data flow, table relationships, skill graph
    └── troubleshooting.md            -- common issues and fixes

Outputs (quiz.py, environment.yml) live in your workspace once the agent generates them. They are intentionally not tracked in this repo.

About

snowflake coco workflow that builds and deploys a streamlit-in-snowflake snowpro quiz app from a study guide pdf. swappable to any snowflake cert.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors