Priori Signal

Home/Blog

Plain-language analytics with Priori Lens

Priori Lens turns a business question into a chart using agreed metrics, relationships, and filters from your data model.

Business intelligence4 min

Priori Lens lets a person ask a business question in plain language and receive a chart. Lens also shows the data objects used for the answer, so the person can check how it interpreted the question.

A question asked in plain language in Lens, with the resulting chart and the objects it resolved to
A question, its chart, and the data objects Lens used.

The person can then ask a follow-up question, select one country, change the date range, switch the chart to a table, or save the result. A language model interprets each request and prepares a query. The Priori data model supplies the agreed metrics, relationships, and filters for that query.

A question in chat, the query steps, and the resulting chart.

In June 2026, Anthropic described a similar approach. On its internal evaluations, Claude answered no more than 21 percent of analytics questions correctly without its analytics skills. Curated data sources, business definitions, and procedural instructions raised aggregate accuracy above 95 percent. These figures apply to Anthropic's evaluation set, but they show how much the surrounding data structure affects an answer.

The Ontology data model

Priori calls its shared data model the Ontology. A database schema lists tables, columns, and data types. The Ontology records what that data means in the business:

  • Objects are business entities such as an affiliate, campaign, user, purchase, chargeback, or merchant account.
  • Measures are defined calculations. For example, a revenue measure can specify how to handle refunds and chargebacks.
  • Relationships state how objects connect. One affiliate can be linked to many users, and one user can make many purchases.

Priori records the definitions selected with your team. Lens uses the same definitions for each question.

What the person asking reads

The query readout in Lens: four fields named in business terms, the object they come from, and the sort order

The same figures, written against the raw tables

SELECT date_trunc('month', c.converted_at)  AS converted_at,
       c.user_conversion_number,
       sum(c.amount_usd)                   AS revenue_usd,
       count(*)                            AS count
  FROM priori_marts.fct_conversion c
 WHERE c.status = 'settled'
   AND c.id NOT IN (SELECT conversion_id FROM refunds)
 GROUP BY 1, 2
 ORDER BY revenue_usd DESC
The readout names the business terms and the object they come from. The SQL restates the rules each time someone writes it, including which rows count as settled revenue and which refunds to remove.

Where meaning can be unclear

A plain-language question can contain several decisions. "User" might mean every registration, each person who opened the app, or only accounts that passed a set of checks. "Revenue" can mean gross income in one report and income after refunds in another.

How didourtop affiliatesperformlastmonth?

  • ourOne brand, or every brand you run?
  • top affiliatesRanked by gross, or net of refunds and chargebacks?
  • performRevenue, return after cost, or what survives disputes?
  • monthCalendar month, or your payout cycle?
One question contains four decisions. A person who knows the business makes them from experience. Priori records them in the model.

The data model gives each term a specific definition. It also records the meaning of fields with names such as is_active. In one source, that field may identify a record that has not been deleted. In another, it may identify a subscription that still bills.

Measures also include exclusion rules. A reported revenue total may exclude test transactions, staff accounts, and purchases that did not settle. Storing those rules with the measure keeps them consistent across queries.

What the model adds

raw schema                     the model

users                          User
  id                             a registered person
  cr_dt      ?                   registered_at
  st         ?                   status: active | banned | test
  ref        ?                   acquired_by -> Affiliate

orders                         Purchase
  usr        ?                   one payment
  amt        ?                   amount, net of refunds
  ts         ?                   paid_at
  stat       ?                   settled | refunded | charged back

                               User --< Purchase
                                 one user, many purchases
                                 revenue cannot multiply
A warehouse exposes the columns on the left. Someone states the meanings on the right, and every question then resolves against them.

Joins and calculations

A valid database query can still return the wrong total. One common cause is fan-out. If a query joins one affiliate row to three payout rows, the affiliate row appears three times. Summing its revenue then triples the result.

Fan-out

affiliate                        payout
+-----+-----------+              +-----+--------+
| id  | revenue   |              | id  | amount |
+-----+-----------+              +-----+--------+
| 7   |     1,000 |              | 7   |    120 |
+-----+-----------+              | 7   |    120 |
                                 | 7   |    120 |
                                 +-----+--------+

join on id  ->  the revenue row repeats once per payout

+-----+-----------+--------+
| id  | revenue   | amount |
+-----+-----------+--------+
| 7   |     1,000 |    120 |
| 7   |     1,000 |    120 |
| 7   |     1,000 |    120 |
+-----+-----------+--------+

SUM(revenue)  =  3,000        true revenue  =  1,000
One join multiplies the total by three. The query runs, and the result gives no sign of the error.

The Ontology records the grain of a measure, which means the level represented by one value. It also records the number of records allowed on each side of a relationship. Lens uses this information to count a measure once at its stated grain.

Other query errors need similar rules:

  • A join can remove purchases that have no campaign. The relationship definition states whether a matching record is optional.
  • Two tables can have an id column for different entities. Lens uses declared relationships instead of inferring a connection from matching column names.
  • Rates, running balances, scores, and unit prices are numeric, but summing them usually has no useful meaning. Each measure states how it can be aggregated.

Matching stored values

A filter must use the values stored in the source. A question about New York may produce a filter for NYC, while the column contains New York. The query runs and returns zero rows, which can look like a valid result. Lens checks the values in the relevant field before applying the filter.

Unmatched values

question   "revenue in NYC last month"

filter     WHERE city = 'NYC'
result     0 rows

what the column actually holds
+-------------------+---------+
| city              | rows    |
+-------------------+---------+
| New York          |  41,882 |
| New York City     |   3,104 |
| NYC               |       0 |
+-------------------+---------+

answer     "There was no revenue in NYC last month."
The filter is valid and runs without error. The column holds another spelling, so the query returns no rows and the answer reports zero revenue.

Clarification and review

When a request has more than one reasonable interpretation, Lens states the assumption it could use and asks the person to confirm it. The person can select the metric, grain, or date range before Lens runs the query.

A second pass reviews the answer. It checks the grain against the question and compares the total with another calculation. This review can catch errors, but it also increases response time. It does not guarantee that every answer is correct.

Working with your data

This approach can support questions about acquisition, revenue, customer activity, and other areas represented in the connected data. These examples illustrate the method. The available questions depend on the source data and the definitions recorded in the Ontology.

Priori builds the data model over your sources and uses definitions from your existing reports and teams. Book a demo to test Lens with a current business question.