Skip to content

Financial Analyst + SQL Chatbot

Ask the database a question in plain English.

A chatbot that turns plain-English questions into SQL, runs them, and shows the answer as a table with the query it used.

The live demo is paused at the moment. The walkthrough below uses sample data so you can see how it works.

Type
Working demo
Role
Design, agent, backend, interface and deployment
Stack
Node.js, Express, LangChain, LangGraph, Groq, OpenAI, SQL Server, Docker
Illustration, sample data

Which five products sold the most last month?

  1. Reading the schema(order_items, products, orders)
  2. Writing the query
  3. Checking the query
  4. Running it
View executed query
SELECT TOP 5 p.name, SUM(oi.quantity) AS units
FROM order_items AS oi
JOIN products AS p ON p.id = oi.product_id
JOIN orders AS o ON o.id = oi.order_id
WHERE o.ordered_at >= '2026-09-01'
  AND o.ordered_at <  '2026-10-01'
GROUP BY p.name
ORDER BY units DESC;
ProductUnits
Steel water bottle 1 L412
Cotton tote bag377
Bamboo toothbrush, pack of 4341
Glass jar 500 ml298
Jute doormat254

The need

In most companies the numbers live in a database, and only a few people can write the SQL to get them out. Everyone else waits in a queue or works from last month's export.

What we built

A chat interface where an AI agent reads the schema, writes and checks the SQL, runs it and shows the result with the query attached.

Questions, not queries

Type a question the way you would ask a colleague. The agent reads the database schema, writes the SQL and runs it.

Checked before it runs

A LangGraph agent lists tables, inspects schemas and sample rows, validates its query before running it, and retries when the database returns an error.

You can see exactly what it did

Results come back as a table, with the executed SQL one click away, so anyone who knows SQL can verify the answer.

SQL still works

Type a query that starts with SELECT or WITH and it runs directly, skipping the AI entirely.

Company data on tap

Quotes, financial statements, net debt, dividends and splits, and news from public market data, with an AI-written summary of the headlines.

Keeps going when a provider doesn't

Model calls rotate across API keys and fall back to a second provider if the first fails.

Try it

Pick a question. The agent reads the schema, writes and checks the SQL, runs it, and shows you the query with the answer.

Ask a sample database

An illustration on a fictional shop's database. Every answer shows the SQL that produced it.

Pick a question above.

How it works

  1. Question

    Plain English

  2. Read schema

    Tables and columns

  3. Write SQL

    Agent drafts query

  4. Check

    Validate, retry on error

  5. Run

    Against the database

  6. Answer

    Table plus the query

Built so people can trust the answer

A chatbot that answers database questions is only useful if people believe it. Three decisions do most of the work:

  • Show the query. Every answer carries the SQL that produced it. Someone who knows SQL can check it in seconds, and everyone else learns to trust it by seeing it hold up.
  • Let the agent look before it writes. Listing tables and reading sample rows first means fewer wrong joins and invented column names.
  • Fail loudly. When the database returns an error, the agent reads it and retries. If it still fails, the real error is shown, not hidden behind a vague message.

What this means for your business

The same pattern works over your sales data, inventory, admissions or patient appointments: a manager asks "how many orders did we ship late last month, by city?" and gets a table, with the query attached, without waiting for anyone.

Tech specs

Interface
Chat in the browser
Agent
LangChain SQL toolkit with a LangGraph ReAct loop
Models
Llama 3.3 70B on Groq, with OpenAI as fallback
Database
Microsoft SQL Server
Transparency
Executed query shown with every answer
Market data
Public market data: quotes, statements, dividends, news
Backend
Node.js and Express, with a Python agent service
Hosting
Docker on Hugging Face Spaces

Want something like this for your business?

Tell us what eats your team's week. You'll get a written scope with a fixed price and timeline before any work starts.