2026 Week 19 | Sigma: AI Credit Risk Analysis

Introduction

This week’s challenge explores something entirely new for Sigma – calling an external AI API directly from a workbook action.

Using Sigma’s API Connector and Action Sequences, you’ll build a Credit Risk Intelligence app that sends live loan data to Claude’s AI and displays a real-time risk explanation – all without leaving Sigma.

Need Access to Sigma?

Note: You will only have view access to WOW Workbooks, Folders, and Workspaces, not edit access. Please create your WOW Workbooks under “My Documents.” We suggest creating a folder to organize all your workbooks. 

1. Set up the API Connector
  • Go to Administration → API → Create Connector
  • Configure a POST connector to https://api.anthropic.com/v1/messages
  • Add headers: x-api-key, anthropic-version: 2023-06-01, content-type: application/json
  • Set request body with a {{prompt}} variable (type: Text)
  • Map response output: Variable name = claude_response, Path = "content.0.text"

2. Build the Loans table
  • Source: FINANCE/LENDING_CLUB/LOANS
  • Key columns: Grade, Loan Amount, DTI, Annual Income, Employment Length, Home Ownership, Revolving Util, Delinquencies, Verification Status, Loan Flag
  • Create a Claude Prompt column assembling loan data
3. Create the Input Table
  • Add a Claude Analysis input table with columns: App ID, Risk Explanation, Trigger
  • Set to Editable in published version (all users)
  • Add a Claude Risk Analysis calculated column: (hint: use something like a RegexpExtract)

4. Wire up the Action Sequence

On the Loans table, create an action sequence triggered On select → App Id:

  1. Call API → Claude Risk Explainer, prompt = Claude Prompt column
  2. Insert row → Claude Analysis, App ID = Column → App Id, Risk Explanation = Action var → Data
  3. Set control → CE-Placeholder = Column → App Id

5. Connect the CE-Placeholder control
  • Create a Text input control named CE-Placeholder on a hidden Controls page
  • Set its Filter Target to Claude Analysis → App ID
  • This filters Claude Analysis to the selected loan’s row
 

6. Build the KPIs and filters
  • KPI cards: Total Loans, Bad Loan Rate, Avg Loan Amount, Avg DTI, Avg Interest Rate
  • Filter controls: Grade, Loan Flag, Loan Status (targets: Loans table only)

7. Display the analysis
  • Add a text element sourced from Claude Analysis → Claude Risk Analysis
  • The CE-Placeholder filter ensures only the selected loan’s analysis displays

 

Stretch Goals (optional)
  • Add AI_CLASSIFY on the Claude Risk Analysis text to generate a risk tier (High / Moderate / Low) using Snowflake Cortex
  • Add charts: Loan volume by Grade colored by Loan Flag, Avg Loan Amount by Purpose

 

Requirements

Dataset

Share

After you finish your workout, share on LinkedIn, Sigma’s Community page, (or Twitter) using the hashtags #WOW2024 and #SigmaComputing, and tag Stanley Gai, Jess Batten, Ashley BennettEric HeidbrederKatrina Menne, Carter Voekel, and Michal Shaffer!

Create an interactive, sharable version of your solution here.

Also, make sure to fill out the Submission Tracker so that we can count you as a participant this week to track our participation throughout the year.

Solution