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:
- I ran query X. The results show that John has made the most sales.
- Then I ran query Y. Those results show John in second place.
- Then I checked the performance review documents and found positive reviews for John in each of the last three quarters.
- 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.