Skip to content

Ask AI about sessions

One question asked of up to 100 sessions: a model answers it for each session, and the server counts the answers.

Ask a question of many sessions at once, in plain words. A model reads each session and answers the question for it in one sentence. The server counts the answers into a few themes, and each theme lists the sessions behind it, with links to each session and its recording.

text
Why did visitors leave the pricing page?
Did visitors compare plans before they chose one?
What broke for visitors on Safari?

It needs a model. It uses the one configured for Ask AI. Without one, the panel says that Ask AI is not set up, and no question is sent.

Where to ask

The question box is at the top of Sessions and of Replay. On Sessions the question reads all sessions. On Replay it reads only the sessions that have a recording.

The question uses the range, the timezone and the filters set in the top bar, and on Sessions the path search too. To read other sessions, change those before you ask.

What the model reads

For each session:

  • when it started, how long it was, the device, browser, system and country, and how the visitor arrived
  • the pages, in order
  • the events and the errors
  • the frustration signals: rage clicks, dead clicks and abandoned forms
  • when the session has a recording, what was clicked, which fields were used and the alerts and error messages the page showed

This is what goes to the model provider. The visitor hash, the identify() id and traits, query strings, the city and property values that are email addresses are never sent. Input values are never read: the model sees that a field was used, never what was typed. Blocked and masked parts of a recording are never quoted.

At most 100 sessions

A question reads the 100 newest sessions in the range and the filters. The answer says how many it read of how many there were, for example “Read 100 of 340 sessions in this range”. To read other sessions, narrow the range or add a filter.

How the counts are made

The model writes one sentence for each session and says if the question applies to it. A second call puts each of those sessions in one theme, its main answer. The server then counts the sessions in each theme. The model never writes a count.

A theme’s share is its count divided by the sessions the question applied to, so the shares add up to 100%.

Past questions

Questions are stored for each user and each site. Only you can see yours. Your 50 newest are listed under the box. Open one to read its answer again, or delete it.

The daily allowance

One question uses one unit of the daily AI allowance, however many sessions it reads. The allowance is MICAFORGE_LLM_DAILY_LIMIT and is shared with Ask AI. See the daily limit.

The API

The panel uses these routes. They take a session.

http
POST   /api/ai/sessions            a question, with the site, the window, the filters and recorded
GET    /api/ai/sessions?site=1     your questions on that site, newest first, at most 50
GET    /api/ai/sessions/:id        one, with its progress and, when done, its result
DELETE /api/ai/sessions/:id        delete one

POST /api/ai/sessions takes site, question (1 to 500 characters), the window, tz and filters of the query envelope, and recorded: true to read only recorded sessions. It answers at once with the stored question and status: "running". Read GET /api/ai/sessions/:id until status is done or failed. While it runs, progress gives the sessions read so far and the sessions it will read.

With no model configured it answers 503 with the code ai_not_configured. Over the daily allowance it answers 429 with Retry-After.