Skip to content

Building a prism

A prism's page has four tabs, in the order you build it: Questions, Test, Results and Connect. This page covers Questions, Connect, the header and the ... menu. Prisms, fields and questions has the rules behind each part.

A prism opens on Questions until it has a result, then on Results.

Only admins build prisms. An operator sees Results and Try, and runs the live version.

A blank prism opens on Questions, named Untitled prism, with one empty question open and Text to try on the left. Click the name to rename it. Nothing is saved until you choose Save in the header. The first save makes version 1, and version 1 is live at once.

To start from a ready-made prism instead, use one from the library.

A chat assistant can write the whole prism for you. Import JSON on the New prism page opens Write it with an AI assistant, a page with two steps.

  1. Under Ask an assistant, say what the prism should find out, such as "Which team should handle each support email, and how urgent it is". Add a few example texts if you have them, one per paragraph with a blank line between them. Choose Copy prompt: the prompt carries your goal and your examples.
  2. Paste the prompt into any chat assistant. Paste its reply into the box under Paste its reply, or drop a .json file on it, and choose Import and save.

On a new prism, importing creates it from the JSON's fields, context and questions. Import JSON in a saved prism's ... menu opens the same page: its prompt includes the current prism and asks the assistant to improve it, and importing replaces the fields, context and questions and saves a new version. If the JSON breaks a rule, the page lists each problem with where it is, and nothing is saved.

Export JSON, in the ... menu, downloads the version you are looking at in the same format.

The header shows the prism's name, one status and the one button that status needs:

  • Live v5, beside the name: the latest version is the one API calls and extension checks run. There is nothing to do.
  • Unsaved changes with Save: you changed the name, a question, what the prism reads or its context. Save saves them as the next version.
  • Version 5 is saved, not live with Publish: a saved version waits. Publish opens the publish dialog.

You can rename the prism only on Questions, where Save is in sight. Your unsaved changes stay while you move between the prism's tabs, and Save works from any of them. Leaving the prism with unsaved changes asks Leave without saving? first.

The ... menu holds History, Prism settings, Duplicate, Import JSON, Export JSON and Docs.

Questions has three columns: Text to try on the left, Questions in the middle and Answers on the right. Each answer sits on the line of its question.

At rest a question is one line: a mark for its type, its short name and the question. Click a line to open it. An open question shows the question in full, its picture in outline, its key, and Edit, Duplicate and Delete. Click its name to fold it again. One question is open at a time.

The picture is the shape every answer to the question takes:

  • A Choice or Scale is a row of cells, one per option or level. A Choice ends with two lighter cells, Other and Not enough information.
  • A Yes / No is a track from No to Yes that states its cutoffs, such as "No below 35", "Unsure" and "Yes from 65".

An answer that needs a person is outlined in plum.

Add question, under the list, adds an empty one and opens its form. The head of the column counts the questions, such as "5 of 64". Duplicate adds a copy as a new question: its key gets _2, _3 and so on, and its short name is left empty, because two questions cannot share one. Delete removes the question.

Edit opens the question's form in place, and Done closes it.

Write the question as a person would ask it. Its type follows from the first word:

  • Choice for a question that starts with Which or What. It picks one option from your list, such as Billing, Tech or Sales.
  • Scale for one that starts with How urgent, How likely or How much. It picks one of 2 to 10 ordered levels, lowest first, and a new one starts with Low, Medium and High.
  • Yes / No for anything else. It gives how likely the answer is yes, from 0 to 100%.

Once you have typed, Answer type shows the type as three buttons, and you can pick another. After the first save a question's type is fixed and the buttons go. For another type, add a new question.

Short name, up to 40 characters, such as Leaving?, names the question in the list and, once its version is live, in Results, Test, Home and the browser extension. The model does not read it. A question without one is named from its key.

Instructions holds detail the model needs, such as which field to read or what counts. The model reads the question first, then the instructions, so they need not repeat it.

Key is the question's name in the API, such as leaving. The app fills it in from the question's first three words. You can change it until the first save. After that the type and the key are fixed, because callers depend on them.

Option keys come from their labels and are fixed once saved too. Connect lists every key.

Cutoffs is one rail from No to Yes with two handles and a box at each end. Below the left handle the answer is No, from the right handle it is Yes, and between them it is Unsure, hatched on the rail. Drag a handle, move it with the arrow keys, or type its value in its box: No below on the left, Yes from on the right. The line under the rail says it in words, such as "Between 35% and 70% the answer is Unsure." Blank is 50%. See Yes / No cutoffs.

Each option or level has a label and, under it, an optional description. The description is what the model reads to tell options apart. Write one whenever two options could be confused, and say what does not belong as well as what does. + Add an option or + Add a level adds one, and × removes one.

A Choice can also answer Other or Not enough information, so you don't add them.

Copy from another prism, beside Add question, shows when the account has another prism. It opens a dialog where you pick a prism and one of its questions. Copy question adds it to this prism until you save. If its key is taken here, the copy gets _2, _3 and so on.

Text to try shows the fields, the pieces of text your tools send with each call, each under its name. Edit fields, at the foot of the column, opens them:

  • Type a field's name. Under it are its key, the field's name in the API, such as subject, which your developer sends, and its kind: Text or an Image, such as a photo or screenshot. Images need a model that reads images, and a prism has at most four image fields.
  • + Add a field adds one, up to eight. Remove takes one away; a prism keeps at least one.
  • You can change a field's key and kind until the first save. After that both are fixed. For another, add a new field and remove the old one.

Done closes them.

Context, the first line of the Questions column, is optional background every question reads, such as "We manage 40 residential buildings in Berlin." Use it for facts about your business, its terms and abbreviations. The line shows how it starts. Show opens it to read and change, and with no context yet the link reads Add.

Type or paste a text into each field under Text to try and choose Run, or press Ctrl Enter (Cmd Enter on a Mac). Each answer shows in Answers, on the line of its question. Open a question to see its picture filled in for this text, beside the outline, and Open as a result. Try and file runs has the details.

With unsaved changes, the button reads Save and run. Try runs only a saved version, so it saves your changes as the next version first, then runs it. API calls keep using the live version.

Save, in the header, saves the name and the questions as the next version. Every save creates a new version, and a saved version never changes. If something is missing, the save stops, the first question with a problem opens in its form, the others are marked Needs a fix, and the first problem scrolls into view.

If someone else saved a version while you were editing, your save is refused. Load their version, dropping your changes loads theirs.

Saving does not change what API calls run. Calls that name no version run the live version, and it moves only when you publish. Check a saved version first with Run on Questions and on Test, which use the latest saved version.

Choose Publish in the header, or next to a version in History. The Publish version 5? dialog says that the version becomes live, which API calls and extension checks will use it, and that results already saved keep the version that answered them. Under that, a line shows only when it has something to say:

  • Test: what Test found when a test set has finished runs of both versions on the same texts, in verdict words, such as "Better on Team. No worse on the other 7 questions." and the set it came from. See it in Test opens the comparison, and Details has the counts of answers fixed and newly wrong. When a question got or leans worse, the line is red and the dialog puts the focus on keeping the live version. Without such a pair of runs it reads "Not tested against your answers yet." with Test first.
  • API: what changes for code that calls the prism, in plain words, such as "Calls must now send Order id. Calls without it are refused." A change that breaks calls shows in red. For developers lists the same changes by key.
  • Checks: the extension checks that lose an outcome, because the version no longer offers its answer.

When a check reads no part of the page for a field the version needs, the dialog says so above its buttons, with Open the check, and Publish stays off until the check has one.

Choose Publish, or Keep version 4 to cancel.

History, in the ... menu, lists every saved version, newest first: when each was saved, and since when the live one has been live. View opens a version on Questions, read-only: the fields it read, its context and its questions. Open a question and choose Details to read all of it. Results made with that version keep these questions. Back to latest returns to the version you edit.

Publish next to a version opens the same publish dialog. Publishing an older version makes it live again, for the calls that come after it. Saved results stay as they were.

Prism settings, in the ... menu, holds the settings that apply to the whole prism and are not part of a version. Changing one does not save a version.

What Prismlet keeps of each text this prism answers, from Try, file runs, the API and the browser extension. The model provider still receives the text to answer it.

  • The text (full in the API's input_storage) keeps the fields and context with each result, to read, retry and export.
  • A fingerprint (fingerprint) keeps a keyed hash instead, so a repeated text can be matched but not read.
  • Nothing (none) keeps the answers only.

Switching to a stricter setting asks first, and applies to new results. A checkbox in that dialog also removes or fingerprints the text already stored, which cannot be undone. A result without its text cannot be retried. Test sets are separate and keep their texts until you delete them. See Results.

Names the answers a person should read, such as "Leaving? is Yes, Mood is Angry". Change picks them. Home and Results count the results with one of these answers. Nothing is sent or blocked.

A Choice or Scale answer whose top answer is below this percentage counts as Unsure in the app. It also decides when the extension asks before Send, because an Unsure answer on a question that can warn or block warns. Yes / No uses the cutoffs on each question instead, and what the API returns does not change. Same as the account follows the account's setting; clear it to set this prism's own, then choose Save.

Advanced holds Test comparisons (Leaning edge), a p-value cutoff. Test calls a change between two versions Leaning when chance explains a split like it less often than this, such as 1 in 5, but not under 1 in 20, where it reads as real. See Testing.

Calls name the prism by this name, such as support-routing, set from the prism's name when you create it. The API reference calls it the slug. Renaming the prism does not change it. Change... sets another one: 2 to 63 lowercase letters, digits and dashes, starting with a letter or digit. Calls to the old name stop working at once. Calls by the prism's id are not affected.

Duplicate, in the ... menu, makes a new prism named after this one with "(copy)" added. The copy has the same fields, context and questions, starts at version 1 and opens on its Questions. It is made from the last saved version, so the app asks first if you have unsaved changes. The Prisms page offers it in each row's ... menu too.

On the Prisms page, open the ... menu on the prism's row, choose Archive... and confirm. The prism leaves the list and stops answering API calls. Its results stay readable by their links. Archiving cannot be undone.

The Connect tab, at /prisms/{id}/connect, starts with one sentence on how the prism got its texts in the last 7 days, such as "Support triage reads texts over the API and in Gmail through the extension." Under it are the three ways in, one line each, with what came that way under This week. One is open at a time. The API is open when the tab opens, and choosing another line opens that one instead.

What you hand your developer: the call on the left and its reply on the right.

The call is a ready curl command for this prism, with its name in the address and its field keys. The copy button beside it copies it. It is the safe call: it sets a 45-second client timeout and sends an idempotency_key, so repeating it returns the stored result instead of answering the text again. See Sending a text.

Under the call, Address is the method and path, and Key says how many active API keys the account has, with Create a key. When a saved version waits to be published, a line says so and what changes for callers once it goes live. Developer docs and Quickstart open those pages.

More about the call opens the rest:

  • Name: the name in the address, with Change....
  • Id: the prism's id, which works in the address too and never changes, with Copy.
  • Version: calls run the live version, and sending "version": 3 pins a call to version 3, even after someone publishes another.
  • Repeats: a call that sends its idempotency_key again gets the stored result back, or one more try if that result failed.
  • Formats: the formats on offer, picked with ?format= on the address. ?format=raw adds the probabilities.
  • Limit: 600 calls a minute for each key. See Limits.

The reply is what the call returns in the default json format: your latest answered result once the prism has one, and until then the same shape with empty values. The fields around the answers sit on one line, such as 9 more fields, which opens. Each answer key has the mark of its question type beside it and every value the API can return for it, with the result's own value in bold: a Choice's option keys, a Yes / No's yes and no, with unsure when its cutoffs leave a band between them, and a Scale's level keys. Point at a Yes / No to see its cutoffs. Every Choice can also return other or insufficient_information. The copy button copies the reply as JSON.

The call, the reply and the keys are the live version's.

Closed, the line says whether a check runs the prism, such as "The Gmail Compose check runs it" or "No check runs this prism yet". Open, it lists each check that runs it: its name, which opens the check, the app and screen it works on, and the answers it blocks or warns on, such as "Blocks on Threatens legal action: Yes. Warns on Mood: Angry or Frustrated." A check that is turned off says so. Add a check opens a new check. See Checks.

Closed, the line names the last file the prism answered and when. Open, it says what a file needs, a column for each field with one text a row, and links to that file's texts in Results. Answer a file opens the file runner.