Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Lakewatch is in Beta. Workspace admins can control access to this feature from the Previews page. See Manage workspace-level previews.
Use Azure Databricks Genie to triage alerts, write detection logic, and investigate threats by asking questions in plain language. Two parts of the Genie family do this work in Lakewatch:
- Genie Code: An AI assistant embedded across the Lakewatch UI. Use it for quick, context-aware help: writing SQL, building detection rules, and exploring datasources. Click Genie on the sidebar to open a full-page chat, or click Genie Code in the top bar to open it in a pane alongside the page you're on.
- Genie Agents (formerly Genie spaces): Dedicated environments for deep, multi-step investigations in Agent mode.
This page covers using both for Lakewatch security workflows. For what Genie is, how it's billed, and general setup, follow the preceding links.
Triage alerts with Genie
To have Genie triage security alerts, create an investigation from one or more alerts. Genie plans the work as tasks, queries your security data, records findings with supporting evidence, and proposes a verdict. You review its work, correct findings that are wrong, and close the investigation with the final verdict. See Create an investigation.
Triage an alert in compliance security profile workspaces
Investigations aren't available in workspaces that have the compliance security profile enabled. In those workspaces, you triage one security alert at a time in a Genie conversation. Genie reads the detection rule that produced the alert, checks how often that rule has fired before, examines the alert's signals, and queries your security data to test benign and malicious explanations. It then proposes a classification of true positive, false positive, or benign positive. If the evidence is insufficient, Genie says so and leaves the alert's classification and state unchanged.
To triage an alert:
- Click Alerts in the sidebar and open the security alert.
- Click Triage with Genie at the top of the alert. If you started the alert's saved triage conversation, or you're a workspace admin, the button reads Resume triage and reopens that conversation.
- Review the plan that Genie states, and follow along as it runs its queries.
- Review the verdict. Genie asks for your approval before it adds a comment to the alert, and again before it sets the alert's classification and state and assigns the alert to you. Approve each change only if it matches your assessment.
Genie adds a comment with the following sections:
- Summary: The verdict and the primary root cause.
- Assessment: The classification and the resulting alert state.
- Risk-based evidence: Each finding that shaped the verdict, with its time frame and the data it came from.
- Detection quality assessment: An evaluation of the rule that fired, including any gap that caused a false positive and a recommended fix.
- Next steps: Recommended follow-up actions, separated into immediate and deferred work.
Genie saves the triage conversation to the alert. If another user starts a new triage, the new conversation replaces the saved one. Triage with Genie isn't available on system errors, and Genie needs a running SQL warehouse to run its queries.
Configure a Genie Agent for threat intel
In Agent mode, a Genie Agent analyzes threat intelligence feeds and surfaces potential threats from your security data. This section walks through configuring a Genie Agent for Lakewatch threat-intel workflows.
Prerequisites
- Parsed tables ingested and available in your catalog
- A threat intel feed loaded into Azure Databricks (for example, a TAXII/STIX feed mapped to a table)
- Agent mode available in your workspace
Step 1: Create a Genie Agent with your security data
Create a Genie Agent and connect the data you want Genie to query:
- All relevant parsed tables
- The
signalsview in your catalog's__lakewatchschema - The
system_eventsview in your catalog's__lakewatchschema - Your threat intel table
Note
A Genie Agent supports up to 50 tables, views, or metric views. For larger environments, create topic-specific agents (for example, an "Endpoint" agent).
Step 2: Turn on Agent mode
In your new Genie Agent, click the Agent mode icon in the chat box. This enables Genie to perform multi-step analysis across your data rather than answering single questions. See Use Agent mode.
Step 3: Add instructions
Good instructions help Genie understand your data model and where to look when answering questions. Go to Configure > Instructions > Text and add context covering the following areas.
General guidance:
- Focus queries on parsed tables unless the user explicitly asks about raw data.
- Lakewatch runs detection rules on a schedule.
Core terminology:
- Signal: An event record that a detection rule produces when its conditions match. Lakewatch groups signals into alerts.
- Entity: Users, hosts, applications, or network devices.
- Asset: Protected resources tracked for security status.
- Detection rule: A saved SQL query that searches event data for specific patterns.
- Datasource: A data pipeline that ingests security data from external sources (for example, AWS CloudTrail, Akamai WAF), existing Unity Catalog tables, or API connectors.
Schema context:
- Parsed tables carry your declared fields plus Lakewatch-managed columns (
lw_id,lw_meta,lw_observables). - Severity is a free-form label that each detection rule sets, such as Informational, Medium, High, or Critical. Don't assume a numeric scale.
In the following instruction, replace <threat-intel-table> with the name of your threat intel table.
Threat intel feed context:
- The
<threat-intel-table>table contains recent threat feeds. Users can use this table to understand threats they should be considering.
Tip
Explicitly naming the threat intel table in your instructions is important. Without this context, Genie might answer threat questions using other tables (like signals) rather than your intel feed.
Step 4: Query for threats
After you configure your agent, ask Genie questions about your threat landscape.
If Genie doesn't reference your threat intel table automatically, do one of the following:
- Explicitly name the table in your question: "Using the
<threat-intel-table>table, what threats should I be concerned about?" - Add instructions pointing Genie to the table for threat-related queries (see Step 3).
Example queries
| Query | What Genie returns |
|---|---|
| "What threats should I be concerned about?" | Summary of active threats, pulling from signals |
"Using the <threat-intel-table> table, what threats should I be concerned about?" |
Analysis of MITRE ATT&CK techniques, threat actor groups, and malware families from your intel feed |
| "Are there any new threats I should be considering or looking for?" | Recently updated attack patterns, emerging malware families, and active campaigns |
| "Find detection coverage gaps for command and control tactics." | Gap analysis across MITRE ATT&CK tactics |
| "Can you review all activity from IP 203.0.113.42?" | Investigation summary for a specific entity |
| "Walk me through what happened with the corporate S3 bucket defacement." | Phased attack summary with next steps |
Troubleshooting
Genie isn't using the threat intel table
Add explicit instructions in the Genie Agent configuration pointing to the table name and its purpose. Genie defaults to whichever table seems most relevant to the question. Without a hint, it might use signals instead.
The threat intel feed isn't in Azure Databricks
You must ingest the feed and structure it as a table before Genie can query it. A liquid clustered table mapping 1:1 to your TAXII file fields is the recommended approach.
Tips for best results
- Be specific in your prompts: Naming the table directly improves relevance.
- Use instructions to reduce friction: After you document the threat intel table in Genie's instructions, analysts can ask natural language questions without specifying table names.
- Iterate on instructions: If Genie consistently pulls from the wrong source, refine your instructions to be more explicit about which table to use for which type of question.
- For more on creating and tuning agents, see Create and manage a Genie Agent.
Genie Code example prompts
Genie Code can help you write SQL queries, build detection rules, explore datasources, and more. The following example prompts are organized by use case.
Tip
To have Genie triage security alerts, see Investigations.
General
Show general prompts
SQL queries:
- "Execute this SQL query: SELECT * FROM my_table LIMIT 10"
- "Run a query to count rows in the authentication table"
- "Show me the schema of this table"
- "Query the last hour of network traffic data"
Table discovery and schema:
- "Search for all tables with 'user' in the name"
- "Find tables in the security catalog"
- "What columns does the http_activity table have?"
- "Show me data types for all fields in this table"
- "List all available catalogs and schemas"
Asset search:
- "Find Unity Catalog volumes with sensitive data"
- "Search for dashboards related to security monitoring"
- "Locate notebooks that query authentication logs"
Documentation search:
- "Search documentation for Spark SQL date functions"
- "How do I use window functions in Databricks?"
- "Find documentation about Delta Lake time travel"
Detection
Use these prompts when building and managing detection rules.
Show detection prompts
Describe what you want to detect:
- "I want to detect data exfiltration from our network"
- "Create a rule to find users accessing sensitive files they shouldn't"
Discover tables:
- "What tables contain authentication events?"
- "Show me sample data from the network_activity table"
- "What fields are available in the authentication table?"
Write detection SQL for different detection logic types:
- "Write SQL to detect IPs with more than 100 failed logins in an hour" (threshold)
- "Detect users with unusual login counts compared to their baseline" (anomaly)
- "Detect when a user logs into a host for the first time" (first-time-seen)
- "Detect users logging in from multiple countries within 2 hours" (geo-anomaly)
- "Detect database queries running after midnight" (time-based)
Modify existing detection SQL:
- "Add a filter to exclude service accounts"
- "Increase the threshold to reduce noise"
- "Combine this with after-hours filtering"
Test and debug queries:
- "Run this detection query and show me the results"
- "The query returns no results, help me debug"
- "This query is too slow, help me optimize it"
- "This generates too many false positives, how can I tune it?"
Map to MITRE ATT&CK:
- "What MITRE techniques apply to brute force attacks?"
- "Map this detection to the appropriate tactics and techniques"
- "Show me details about technique T1078"
Define signal output:
- "Write a summary template for this alert"
- "What context fields should I include?"
- "Show me what the alert looks like with sample data"
Set up scheduling and compute:
- "Configure this to run every 15 minutes"
- "Set up a daily compliance check at 2 AM"
- "Run this only during business hours to save costs"
- "Should I run this rule on serverless compute or a SQL warehouse?"
Work with existing rules:
- "Show me the configuration for the 'Brute Force Login' rule"
- "List all detection rules in this workspace"
- "Modify the threshold in the existing rule"
Learn about detection concepts:
- "Explain how threshold detection works"
- "What's the difference between anomaly and threshold detection?"
- "What are the cost implications of different schedules?"
Build multi-step workflows:
- "Build a complete brute force detection from scratch"
- "Create a correlation between failed logins and privilege escalation"
Troubleshoot detections:
- "Why isn't this detection triggering?"
- "Validate all field names exist in the schema"
- "The baseline is wrong, how do I rebuild it?"
Query
Use these prompts on the query page.
Show query prompts
Explore data:
- "How many rows are in the raw table of datasource Okta?"
- "Show me the parsed table schema for AWS CloudTrail"
- "Compare row counts between the raw and parsed tables for datasource crowdstrike_events"
- "Show me the last 10 events from the Crowdstrike parsed table"
Refine results:
- "Filter these results to only show events from the U.S."
- "Add a column that calculates risk score"
- "Remove rows where status is 'test'"
- "Group these results by user and count events"
- "Sort by the timestamp column descending"
Optimize queries:
- "This query is taking forever. How can I speed it up?"
- "It returned 5 million rows. How do I reduce that?"
- "Is this query efficient?"
- "How can I optimize this JOIN?"
- "Help me fix the query error"
Interpret results:
- "What do these results tell me?"
- "Are there any patterns in this data?"
- "Summarize what I'm looking at"
- "What should I investigate based on this?"
Datasource
Use these prompts when configuring and managing datasources.
Show datasource prompts
Assess data quality:
- "Show me a summary of my data quality"
- "Are there any columns with mostly null values?"
- "What's the distribution of values in the 'event_type' column?"
- "Analyze the raw schema and show me what columns exist"
- "Which columns have JSON data that needs extraction?"
Diagnose errors:
- "Why did my datasource preview fail?"
- "The preview returned an error, help me debug"
- "I'm getting 'column does not exist' error, what's wrong?"
Extract JSON fields:
- "Flatten the 'user' JSON object into separate columns"
- "Extract fields from the 'metadata' JSON column"
- "Preserve the original JSON column after extraction"
- "Add a prefix to extracted JSON fields"
Transform fields:
- "Rename the 'userId' column to 'user_id'"
- "Cast the 'timestamp' field to proper TIMESTAMP type"
Filter data:
- "Filter out internal IP addresses"
- "Only include records where status is 'success'"
- "Exclude records with null values in the 'user_id' field"
Create and modify tables:
- "Create a new parsed table for only authentication events"
- "Split the raw data into separate tables by event_type"
- "Add a custom table with specific fields only"
- "Modify the existing 'security_events' table to add a new field"
Configure column preservation:
- "Preserve all unreferenced columns from the raw table"
- "Omit columns that aren't explicitly mapped"
Validate and preview:
- "Validate this field expression before I apply it"
- "Preview the transformation results"
- "Show me sample data after applying these changes"
Get recommendations:
- "My data looks messy, what transformations do you recommend?"
- "Are there any data quality issues I should address?"
- "What's the best way to handle this high null rate column?"