Cognitive AI

The problem

The application had around 60–70 connected tables for different parts of the platform, including users, organizations and reports. People could browse records and use basic filters, but they could not combine several conditions, count results or group them through the interface. The data was available; getting an answer meant writing a more complex query.

Our approach

Let people ask a question in their own words. Give the AI descriptions of the tables, columns and connections so it can work out where to look and which queries to run.

The solution

We built an AI assistant connected to the application’s existing data service. It turns questions into queries, retrieves matching records and automatically generates a result view based on the response. People can explore the data without writing queries themselves.

An interface that fits the answer

Each question needs a different kind of answer. We built the AI assistant to automatically select and generate the interface from the query response. A list of records becomes a table. A comparison becomes a chart. A simple count becomes a total.

The aim is to make the answer easy to understand, without asking people to work through a screen full of raw data.

What the question needsHow the answer appears
Find matching recordsA table with the relevant columns
Compare groups, such as user rolesA bar or pie chart showing the breakdown
See how activity changes over timeA chart showing the trend
Get a count or a few key numbersClear totals with short labels

The assistant can generate several views within the same answer. The organization question below, for example, brings together total organizations, active organizations and recent reporting activity.

How it works

  1. Understand the question

    Work out which records, conditions and time range the person is asking about, and whether they need a list, a count or a comparison.

  2. Understand how the data is organized

    Read descriptions of the available tables and columns, and how they connect. Identify which data can answer the question.

  3. Build the queries

    Choose the columns and filters, and decide what to count or group together. Check that the requested columns exist before running the queries.

  4. Fetch the results

    Run the queries through the application’s existing data service. Use the returned records and counts to answer each part of the question.

  5. Generate the result view automatically

    The AI assistant uses the query response to select and generate the right view: a table for records, a chart for comparisons or trends, or totals for counts.

Two examples

Count users by role

How many users do we have in each role?

Find where user roles are stored, group users by role and count each group. The result becomes a chart showing super admins, admins, normal users and read-only users.

Cognitive Library answering a user-role question with 200 users across four roles and a pie chart

Look across related records

How many organizations do we have, how many are active, and how many created a report in the last 30 days?

Count organizations, check which are active, then look up their reports from the last 30 days. An organization with several reports is counted once. This example has 24 organizations, 18 active and 11 with recent reports.

Cognitive Library answering a question across organizations and reports, showing counts of 24, 18 and 11