Skip to content
SemCue

Client project · business consultant · AI diagnostics

The AI writes the review.The code does the maths.

A business consultant wanted small-business owners to run the diagnostics themselves: a short quiz, a detailed interview, and at the end a review as a web page, PDF and slide deck that the consultant checks and releases. His main requirement: never mix facts, hypotheses and training figures, and never make numbers up. So the code picks the conclusion by the method, and the language model gets ready-made drafts and rewrites them in the consultant’s voice.

Installed at the client · 13 October 2026 · the client’s server; the whole path from quiz to PDF and slide deck checked on test clients

  1. Business ownerQuiz, 10 questionsa map across five areas and three observations
  2. Business ownerInterview, 8–18 screensfigures for two periods; any question can be answered “I don’t know”
  3. CodeCalculations and method17 formulas and prioritised rules pick the main point of attention
  4. Language modelReview textrewrites ready-made drafts in the consultant’s voice
  5. CodeText checka number with no source or a cause with no data: the section falls back to a template
  6. ConsultantReview and releaseweb page, PDF and slide deck from one snapshot

What the consultant asked for

The consultant works with small-business owners: he goes through their numbers and runs offline workshops built on training cases. He needed a prototype he could show to partners and test offline. The business owner goes through the diagnostics alone, and the consultant checks the result and releases it after payment.

There was no ready specification for the method. There were principles, cases from his practice, the format of his offline cases and his express-diagnostics spreadsheet. From these we built rules of the form “condition in the answers → point of attention → what to check”. Each rule has a priority, in the order the consultant set: first who makes decisions and controls the process, then stock and purchasing, then margin, and only then demand. For every rule, the consultant’s source material is recorded.

One more condition of his: never blame an employee when the failure lies in how decisions are made. So the system suggests training only when the employee has the authority and the checks in place and lacks knowledge specifically.

  • Step 1

    Quiz

    10 questions scored across five areas: finance, sales, processes, management, resilience. The client sees the map and three observations straight away.

  • Step 2

    Interview

    8 to 18 screens depending on the answers: revenue, orders, margin or mark-up, stock, purchasing, advertising, cash reserve and fixed payments. Any question can be answered “I don’t know”.

  • Step 3

    Request

    Before the review is checked, the client sees which area holds the main point of attention and what the review will cover. The conclusion and calculations stay hidden.

  • Step 4

    Review and release

    The consultant gets a review link, can reword the main conclusion, the first step and the practical block, and confirms the release. The client receives a link to the review.

The code calculates and concludes, the model writes

The easy route would have been to hand the answers to a large model and ask for a review. The text would sound convincing, but the model could recalculate the margin its own way, mix up periods or name a cause for falling revenue that the client never mentioned. The consultant would then have to check every line.

So the code does the calculations: average order value, conversion, margin from mark-up or cost of goods, logistics as a share of purchasing, return on advertising, payback on an investment, the month’s result after fixed costs and loan payments, and return on the business by the consultant’s own formula. 17 formulas in all. If a formula lacks inputs it is not run, and the review shows that. A gap never turns into zero.

The method’s rules pick the main point of attention, and when data is thin the system asks follow-up questions. The model gets ready-made section drafts, numbers in Russian format, the owner’s goal and the industry, and returns the text as separate fields in a fixed schema.

What the owner gives

Quiz answers10 questions, scored across five areas
Interview figuresrevenue, orders, margin or mark-up, stock, advertising, cash reserve and fixed payments
“I don’t know”a gap stays a gap and never turns into zero

What the code decides

Runs 17 formulasif inputs are missing, the calculation is skipped and the review says so
Picks the main point by the methoddecisions and control first, then stock and purchasing, margin, demand
Asks follow-up questionswhen there is not enough data for a conclusion

What the model does

Writes the section textfrom ready-made drafts, as separate fields in a fixed schema
Writes the consultant’s noteswhat is happening in the business, risks, questions for the meeting
Neither calculates nor concludesthe code checks its numbers after every answer
The model receives finished calculations and the chosen conclusion. It cannot change them.

Every number in the text is checked

After the model, the code checks the text. A section fails if it contains a number that is not in the client’s answers or the calculations, a reference to an unknown fact, a causal link such as “because”, “so” or “led to”, or a claim of growth or decline without two comparable periods. There are seven such reasons in all. A failed section is replaced by a template the code builds.

The consultant’s notes have a filter of their own: phrases that promise a result, such as “you’ll get your profit back” or “without new investment”, are dropped. A review may say a step can reduce losses, but it does not promise profit.

Model draft

“Revenue grew by 18%, so it’s worth investing in advertising: it will bring the profit back.”

Code checks

  1. Growth or declineAre there two comparable periods? The answers hold one. Rewrite.
  2. The number “18%”Is it in the client’s answers or the calculations? No. Section rejected.
  3. “So”A causal link the data does not prove. Rewrite.
  4. “Bring the profit back”A promised result. The phrase is dropped.

What goes into the review

A template the code built for the same point of attention, using only numbers from the answers and calculations.

Illustrative example, not from a client review; the real checks run on Russian text. One violation is enough to fail a section.

The writing model was chosen on 12 October: eight models were compared on seven scenarios, and Claude Sonnet 5.5 won. If the model is unavailable or the spending limit is reached, the review is still built, with template wording.

Web page, PDF and slides from one snapshot

When the client submits a request, the system freezes the result. The answers, calculations, chosen conclusion and checked text go into an immutable snapshot with a hash and the builder version number. The review page, the PDF and the editable slide deck are all built from that snapshot, so the numbers match in all three.

If the client changes the answers, a new version appears and the old link still opens the old one. A consultant’s rewording also creates a new version that has to be confirmed, while the numbers and analysis stay the same. The builder has gone through 20 versions, and reviews built by any of them open exactly as they were released.

What goes in

Client answersquiz and interview
Calculations and conclusionformulas and method rules
Checked textfrom the model or a template

Snapshot

Cannot be changeda hash and the builder version number
Client changes answersnew version; the old link opens the old one
Consultant rewords a conclusionnew version that must be confirmed, same numbers

What the client gets

Review pagetables turn into cards on a phone
PDFtraining-case pages are printable worksheets
Editable slide deckPPTX for the meeting with the client
A snapshot cannot be changed. Every edit creates a new version.

The paid review holds the main conclusion, a “how the numbers changed” block (before → now), the first step, a practical block with a table that can be filled in on the page and downloaded for Excel, a 90-day plan and a training module of five cases in the order the consultant uses in his offline workshops. There are seven modules, chosen by the main problem, 35 cases in all.

What the test runs found

The substance of the reviews was checked with runs on the test server: typical clients went from quiz to PDF and slide deck. They included retail with falling revenue, a client who answered “I don’t know” to almost everything, growing services, manufacturing with repeated errors, and rising revenue with a falling margin, eight types in all. The slides were rendered and looked at.

  • Interview

    The consultant’s main theme almost never fired

    Questions about a recent failure and an employee’s authority did not appear in a single scenario: the condition depended on an answer the interface did not offer. The rule “first, who makes decisions and how” could barely become a conclusion. Since interview version 0.7 everyone is asked these questions, with an “I don’t know” option.

  • Review

    The free part was more useful than the paid one

    For a client who answered “I don’t know” to almost everything, the quiz summary said more than the paid review. Quiz observations now carry over into the review, and the before → now figures sit right after the main conclusion.

  • Calculations

    Two numbers contradicted each other

    “Pays back in 4.5 months” sat next to “return −33%” for a single period. A one-off investment is now judged by its payback period, and a payback longer than two years is also shown in years.

  • Acceptance

    The review could not see that the money had run out

    The first acceptance run on the consultant’s own examples showed the system missed financial vulnerability. The interview gained a money screen based on his spreadsheet: cash reserve, fixed costs, loans, invested capital. On the example from his spreadsheet the main conclusion became “no cash reserve”, and return on the business matched his own calculation to a hundredth of a per cent.

What the prototype does not do

The prototype was built for showing to partners and for offline tests. The consultant himself moved some ideas to later stages.

Deferred

  • Uploading the client’s files
  • Profiles for trainers, HR and students
  • Automatic payment and a personal account
  • Conclusions from the PEST, SWOT and ABC sheets of the consultant’s spreadsheet
  • A glossary inside the review

In the prototype

  • The path from quiz to release, with consultant review
  • Calculations, the method and the model-text check
  • Web page, PDF and editable slide deck
  • Changing answers with recalculation and versions
  • A data label: client answers or test data

One question about the method is still open. A 20–30% drop in revenue gives way, as the main conclusion, to problems with authority or advertising that does not pay back, because that is how the priorities are set. I left the ranking as it is: it follows the rules, and changing them is the consultant’s call. The training block is rare too: it needs a knowledge gap with authority and checks in place, and the client has to want to practise the skill.

How it was built

A consultant’s method turned into rules

We worked through the consultant’s materials, turned his principles into prioritised rules, settled disputed points in the ranking, chose the model and accepted the work on his own examples. Training modules and working blocks were checked against the format of his offline cases.

Where every rule comes from is recorded in a separate document for the consultant. He received the demos not to approve the whole method but to check for factual errors and departures from what had been agreed.

  • The consultantPrinciples, cases from practice, the offline-case format, the express-diagnostics spreadsheet, demo review.
  • SemCueThe method as rules, quiz and interview, calculations, the check on the model’s text, PDF and slide-deck builds, installation on the client’s server.

For technical readers

Under the hood

Interface
React, Vite and TypeScript. The branching interview is versioned (currently 0.8), and saved requests open in the version they were filled in with.
Calculations and method
Python. 17 formulas with explicit inputs and units. The method is a set of prioritised rules, “condition → point of attention → what to check”, plus follow-up questions when data is missing.
Language model
Called through OpenRouter, answering in a JSON schema. After every answer the code checks numbers, fact references, causal links and trends. There is a spending limit, and without the model the review is built from templates.
Formats
PDF with ReportLab, the editable deck with python-pptx, slides rendered through LibreOffice for checking. All three formats come from one snapshot.
Storage and access
SQLite and files on the server. The review-link key is stored as a hash, and the client’s contact details sit in a separate file with restricted permissions, visible only on the review page. At most 120 requests a minute from one address.
Slow hosting
The hosting proxy cuts a request after 30 seconds, and a review with the model takes longer. The server answers “preparing” at once, and the page asks again until the review is ready. Static files are served compressed and cached.

Where the numbers come from

Every number here comes from working documents and the code

Next system

Our own CRM instead of amoCRM →

SemCue / Let’s talk

What would you like to work on?

Tell us about your project and what you need. A rough idea is enough.

Get in touch on Telegram

We’ll discuss your goals, where things stand and the right next step.

Discuss your project on Telegram
In developmentThis site is still being built, so things may change.