Skip to main content
Back to projects
Production2025Private enterprise project

Sentinel Query Assistant - Natural Language to SQL Chatbot

A natural-language-to-SQL chatbot built into a security dashboard, enabling users to query complex data in plain English instead of navigating multiple views and filters. Built solo from prompt engineering to Kubernetes deployment.

Status
Production
Role
Solo engineer from design through Kubernetes deployment
Duration
2025
Ownership
End-to-end engineering

Problem and constraints

Users needed to answer complex security questions without manually combining dashboard views and filters, while the system still had to protect private enterprise data and prevent generated queries from becoming an execution risk.

  • Private enterprise data
  • Prompt injection risk
  • Read-only SQL
  • Multi-turn context

System flow

  1. 01Sanitize the user question and conversation context
  2. 02Generate constrained SQL from reviewed prompts and examples
  3. 03Validate and execute read-only SQL
  4. 04Summarize results for the conversation

Engineering decisions

Defense in depth

Validate input, constrain generated SQL, and enforce read-only execution instead of relying on the system prompt.

Versioned prompts

Externalized configuration allows reviewed prompt changes without rebuilding the application.

Evaluation

SQL execution success

Confidential. Evaluation used a reviewed set of representative security questions and checked generated SQL for validity, read-only behavior, execution, and answer usefulness.

Reliability, safety, and observability

  • Input validation and SQL constraints treat model output as untrusted.
  • Request and execution failures are surfaced without permitting write operations.

Outcomes

  • Deployed as a production service on Kubernetes
  • Enabled conversational follow-up questions over dashboard data

Failures and lessons

  • Treat generated SQL as untrusted input regardless of model quality.
  • Prompt configuration needs the same review discipline as application code.

Evidence

Implementation details and source code are not public because this is a private repository.