← Back to projects

2025–2026 · FastAPI · Ollama · PostgreSQL

Cervus

A natural-language-to-SQL prototype with queries analysts can inspect.

At The Westervelt Company, through Alabama Productivity Center, I prototyped a way for lease and harvest analysts to ask questions of business data in natural language. Analyst feedback shaped a central product decision: show the generated SQL alongside the answer.

Project stage
Prototype
Database access
Read-only
Generated queries
Inspectable

How the system works

  1. 1. AskAn analyst asks a question about lease or harvest data.
  2. 2. GroundRetrieve schema and relevant business context.
  3. 3. ValidateCheck generated SQL and handle query errors.
  4. 4. InspectShow the query with the returned answer.

My contribution

Built the local text-to-SQL prototype using FastAPI, Ollama, and PostgreSQL. Added schema and business-context retrieval, SQL validation, read-only access, and error-correcting retries.

A decision driven by analyst feedback

An answer alone was not enough for the analysts to verify the work. Displaying the generated SQL made the interpretation of the question and the resulting query visible, giving the analyst a concrete way to check the output.

Outcome and scope

Prototype evaluation estimated potential savings of 500 analyst hours per year. That is a projection, not realized annual savings or evidence of recurring production adoption. This case study describes the approach without exposing employer data, schemas, or internal source code.

← All projectsDiscuss the work →