All projects

An AI that shows its working 2025

Explainable AI assistant for business data and documents

An AI assistant that answers business questions from a company's own documents and database, and shows every query and piece of evidence behind its recommendation.

Client
Under NDA
Industry
Business intelligence, applied AI
Scope
RAG document knowledge base, AI query generation, explainable decision support
Period
2025
The reality

Plenty of AI Pilots, Far Fewer in Daily Use

Almost every company has tried putting a chatbot in front of its data. Far fewer still use it a year later. Gartner predicted that at least 30% of generative AI projects would be abandoned after proof of concept by the end of 2025, citing poor data quality, weak risk controls, rising costs, and unclear business value.

A lot of that comes down to trust. An AI tool that gives a confident answer with nothing behind it is fine for drafting an email. It's not fine when the question is who gets promoted, which supplier to drop, or where the budget should go. Nobody wants to take a decision like that to their board on the strength of "the AI said so".

For business decisions, the answer is only half the value. The other half is being able to check how it was reached.

The challenge

Answers From Our Own Data, With the Reasoning Visible

Our client, whom we can't name, wanted to ask plain-language questions about their business and get useful answers back. Those answers had to come from two places: the documents the company had built up over the years, and the structured data sitting in their database.

That raised three problems at once. The AI needed access to a large and varied set of documents without making things up about them. It needed to query the database without being handed free rein over it. And every conclusion had to be explainable, so a manager could see exactly which numbers and which documents led to it before acting.

What we built

A Knowledge Base Built on the Company's Own Documents

The first piece was a retrieval-augmented generation (RAG) system, built on GroundX. The client feeds all of their documents into it: reports, reviews, policies, and whatever else the business runs on.

When a question comes in, the system finds the passages that actually relate to it and grounds the answer in them. The AI works from the company's own material, not from general knowledge, and it can point to where each piece of information came from.

Queries Built From a Schema, Not Guesswork

The second piece was a system that uses AI to build database queries from a predefined JSON schema.

The schema describes the data the AI may use and the shape each query can take. The AI turns a plain-language question into queries that fit that schema and runs them against PostgreSQL. That keeps it inside clear limits. It can only ask the kinds of questions the schema allows, which makes its behavior predictable and much easier to trust with real business data.

If this sounds familiar, it's because the industry has since arrived at the same idea. We scoped this project with the client in 2024, before the Model Context Protocol had caught on, and by the time development started in 2025 MCP servers still weren't a common way to connect AI to company data. There was no ready-made standard to plug into, so we designed the schema-driven approach ourselves. MCP now formalizes much the same pattern, giving an AI a described set of tools and data it may use, which is a good sign the design was pointing in the right direction.

Every Recommendation Comes With Its Evidence

The part that made the system genuinely useful was partial results. Instead of returning a single verdict, it walks through each step on the way to it.

Ask it "Based on the numbers, who should get a raise?" and the reply looks something like this:

  1. I ran query X. The results show that John has made the most sales.
  2. Then I ran query Y. Those results show John in second place.
  3. Then I checked the performance review documents and found positive reviews for John in each of the last three quarters.
  4. Based on this, I'd nominate John for a raise, with Alice a close second.

Each step shows the actual results behind it. A manager can follow the reasoning, spot a query that doesn't quite match what they meant, and decide for themselves whether the conclusion holds. The AI does the digging, and the person stays in charge of the decision.

A Deliberately Simple Stack

The application runs on Next.js, with GroundX handling document retrieval and PostgreSQL as the database.

That's a small, mainstream set of pieces for a system that does something fairly advanced. Retrieval sits in a dedicated platform built for it, the business data stays in a well-understood relational database, and the application layer ties the two together. Each part can be maintained, replaced, or scaled on its own as the client's needs change.

The outcome

AI You Can Check Before You Act

In 2025 we delivered a system that lets the client ask questions of their own documents and data in plain language, and get back answers they can verify.

That's what moves AI from an interesting demo to a tool people rely on. It doesn't ask anyone to take its word for it. It shows the queries, the numbers, and the documents, and leaves the final call with the people accountable for it.

What we built

Delivered for this project

Every document, searchable by meaning

A RAG knowledge base on GroundX that the client feeds all their documents into, so answers come from their own material.

Questions turned into safe queries

AI that builds database queries from a predefined JSON schema, so it only asks the data questions it's allowed to ask.

Answers that show their working

Every recommendation comes with the queries it ran, the results, and the documents it used, step by step.

How it is put together

System architecture

Client
Next.js
AI
Query generationJSON schema
Knowledge
GroundX RAG
Data
PostgreSQL

More work

Have something similar?

Get a realistic estimate

The more we know about your project, the better we can fit the solution to match your needs. So - let's talk!

Get a realistic estimate