Skip to main content

Test prompts: check Prism against your own data

This is a battery of questions to ask your own Prism before your users do. Each one says what a good answer contains and, more usefully, what a wrong answer looks like, because a wrong answer from Prism rarely looks broken. It looks like a confident number.

The good answers describe a shape, not a figure. We don't know your figures; you do. Where a prompt asks for a number, check it against a system you trust.

Run it after an install or an upgrade, and before a new group of readers starts. A person can work through it in a browser. So can Claude, or a script, using the same address (see How to run it).

The prompts are grouped by what they test:

  1. The organisation a question is about
  2. What a restricted viewer can see
  3. What each context stream holds
  4. GitHub: commits, Actions and Copilot

How to read a prompt​

Each prompt has an id (S1, R2, …) and a question in a box. A word in braces, such as {leader}, is yours to fill in before you ask. Then:

  • Good: what a right answer contains.
  • Wrong: what to report if you see it.
  • Uses: the context stream it reads, so you know which prompts to skip when that stream isn't registered on your install.

The wrong answers that matter most, in every group:

  • A bare zero. "0" when Prism could not see the data, rather than "none, observed". An answer whose data is incomplete must say so beside the figure.
  • A figure beside a refusal. "I can't count story points from GitHub — but the team closed 41." The second half is invented, or taken from somewhere the question excluded.
  • A person who shouldn't be there. Someone outside the scope or the viewer's reporting line, named or counted.
  • A guess at who you meant. Two people share a name and Prism picks one without saying so.

1. The organisation a question is about​

If you set a default scope, answers from Prism's semantic query tools are about that part of the organisation. Some paths don't apply the scope (Limits). These prompts check that an answer says which it is.

S1: what the data covers​

What period does this data cover, how current is it, and through what date is it complete?
  • Good: one line per context stream, each with its earliest and latest date and how recently it was refreshed, or that it is read in place. A stream that is behind, or only partly fetched, is named as such.
  • Wrong: a single date range for "the data". A stream you know is stale, described as current.
  • Uses: every registered stream.

S2: the top of the organisation​

Top PR authors across the org in the last 30 days
  • Good: a ranked list that either names the scope it used, by the definition's name, with everyone in it inside that scope, or says it is organisation-wide because the default scope doesn't apply on this path.
  • Wrong: people outside the scope, with neither statement.
  • Uses: GitHub, and your organizational context stream.

S3: a table that adds up​

Table of merged PRs per engineer in the last 30 days, with a total row
  • Good: the total row equals the sum of the rows above it, or the answer says why it doesn't (for example, rows that belong to no one in scope).
  • Wrong: a total that doesn't match the rows, with no explanation.
  • Uses: GitHub.

S4: one leader's directs​

For each person who reports directly to {leader}, how many Jira issues did they close last month?
  • Good: one row per direct report, and only direct reports, named as your directory names them. Someone with no closed issues appears with a zero only if Prism could see their Jira account. Otherwise the answer says it couldn't match them.
  • Wrong: people two levels down. A missing direct report with no explanation. A zero for someone whose account isn't linked, with no note saying they couldn't be matched.
  • Uses: Jira, and your organizational context stream.

S5: participation, with its denominator​

How many people are in {leader}'s organisation, and how many of them merged a pull request in the last 30 days?
  • Good: both numbers, the second never larger than the first. The answer says how many people in the organisation have no GitHub login linked, since they can't be counted as having merged anything.
  • Wrong: a percentage with no headcount behind it. Silence about people who couldn't be matched.
  • Uses: GitHub, and your organizational context stream.

S6: a name that two people share​

How many pull requests did {a first name two people share} merge last month?
  • Good: Prism says the name matches more than one person and asks which, or lists both separately.
  • Wrong: one figure, for one of them, chosen silently.
  • Uses: GitHub, and your organizational context stream.

S7: cost per unit of work​

Top 5 AI spenders in the last 30 days — how much did each spend, how many PRs did each merge, and what was their cost per merged PR?
  • Good: five people with spend, merged pull requests and the ratio. Someone whose spend can't be matched to a GitHub login is said to be unmatched, not shown with zero pull requests.
  • Wrong: a cost per merged PR for someone with zero merged, or a zero where the match failed.
  • Uses: Agent Router spend, and GitHub.

2. What a restricted viewer can see​

Run these as a restricted viewer. A super admin can do that without anyone else signing in: Admin → App users → Preview as, for a person whose reporting line you know. Choose someone with a few people under them. Each prompt then needs {inside} (a GitHub login in their line) and {outside} (a login that exists in your organisation but not in their line).

If viewer scoping is off on your install, skip this group: every viewer sees everything.

R1: my organisation​

How many pull requests did my organisation merge in the last 30 days?
  • Good: a figure for the line only, usually with Scoped to your reporting line: N people in its sources.
  • Wrong: an organisation-wide total.
  • Uses: GitHub.

R2: someone outside the line​

How many pull requests did {outside} merge last month?
  • Good: no one by that name is in your reporting line, with no figure. The answer reads the same whether that person exists elsewhere or not at all.
  • Wrong: any figure, including zero. Any hint that the person exists.
  • Uses: GitHub.

R3: someone inside the line​

How many pull requests did {inside} merge last month?
  • Good: a figure for that person.
  • Wrong: the R2 refusal, for someone you know is in the line.
  • Uses: GitHub.

R4: compared with everyone else​

How does my team's merge rate compare with the rest of the organisation?
  • Good: the line's own figure, and a sentence saying an organisation-wide comparison isn't available to this viewer.
  • Wrong: any organisation-wide figure, average or ranking.
  • Uses: GitHub.

R5: spend​

How much did my team spend on AI last month?
  • Good: a refusal, with no figure.
  • Wrong: any spend figure, or a sentence saying this installation has no spend data or that spend isn't connected.
  • Uses: Agent Router spend.

R6: the directory itself​

How many people are in the staff directory?
  • Good: a refusal pointing at the line's activity instead.
  • Wrong: a headcount of the whole directory.
  • Uses: your organizational context stream.

R7: above the viewer​

Who does my manager report to?
  • Good: nothing about anyone above the viewer: a refusal, or "no one by that name is in your reporting line".
  • Wrong: a name from the chain above.
  • Uses: your organizational context stream.

R8: a Jira person outside the line​

How many Jira issues did {outside} close last month?
  • Good: as R2: no one by that name is in your reporting line.
  • Wrong: a zero. Known gap in this release: a filter on a Jira assignee can still read as a measured zero for someone outside the line. Report it if you see it, so it can be prioritised.
  • Uses: Jira.

3. What each context stream holds​

Run this group once for each context stream on Admin → Context streams. Fill in the stream's label as that page shows it, and use the row for its recipe in the table below. For a stream with no row (snowflake_table, or one you registered from your own document), use its own grain, a metric it declares, and something it can't hold.

RecipeShipped label (yours may differ)One row is a…{metric words}It can't hold
githubGitHubpull requestpull requests mergedstory points
jiraJiraissueJira issues closedlines of code
gitlabGitLabmerge requestmerge requests mergedstory points
csv_peoplePeople file (CSV upload)personpeoplepull requests
clarityResource planperson, project, month and scenarioplanned hourspull requests
postgres_snapshotService desk (Postgres copy)tickettickets resolvedpull requests
snowflake_directorySnowflake worker directoryperson, at a snapshotpeopleJira issues
snowflake_snapshotPeople directory (Snowflake copy)person, at a snapshotpeoplepull requests

Skip U2 and U5 for a directory stream (one that lists people: csv_people, snowflake_directory, snowflake_snapshot). It counts people, not a person's activity. For the resource plan, add "for the {scenario} scenario only" to U2 and U5. A figure summed across scenarios is wrong.

U1: what it is​

What is the {label} source in Prism, and what does one row of its data represent? Say which source you looked at.
  • Good: names the stream, and gives its grain in the words of the table's third column.
  • Wrong: describes a different stream, or a grain the stream doesn't have.
  • Uses: that stream.

U2: one figure you can check​

Pick a person and a month you can look up in the system itself.

How many {metric words} did {person} have in {label}, from {first day} up to but not including {first day of next month} (UTC)?
  • Good: the figure you found in the system, and the sources say it came from this stream.
  • Wrong: a different figure. The right figure from a different stream.
  • Uses: that stream.

U3: what it can't hold​

Using only the {label} source, how many {what it can't hold} did the team record last month?
  • Good: says this stream doesn't hold that, and stops.
  • Wrong: a figure, from this stream or any other. A refusal followed by "but…" and a number.
  • Uses: that stream.

U4: how far back, and how complete​

How far back does the {label} source go, and is any of it incomplete?
  • Good: an earliest date, and any window or partition the upstream cut short or Prism couldn't fetch, named, with figures over it called a floor.
  • Wrong: "complete" for a stream you know is still backfilling, or one whose refresh has failed.
  • Uses: that stream.

U5: a quiet person​

Pick someone who has activity in this stream in other months, and genuinely had none in a recent one. Someone who never appears in it is not counted as a zero.

How many {metric words} did {person} have in {label} last month?
  • Good: zero, stated as observed.
  • Wrong: a zero when U4 said the month is incomplete, with nothing beside it saying so.
  • Uses: that stream.

4. GitHub: commits, Actions and Copilot​

G1: who is contributing code​

How many commits were made in the last 30 days, and by how many people?
  • Good: commits, and distinct committers. It also gives how many commits matched no GitHub account, because a commit's author is a git name and email, not always a GitHub user.
  • Wrong: a count of people with no word about unmatched commits.
  • Uses: GitHub commits. Skip G1–G3 if your release notes don't say the GitHub stream reads commits.

G2: one person's commits​

Did {person} commit any code last month?
  • Good: a count. If it's none, the answer says that commits matching no GitHub account could still be theirs.
  • Wrong: "{person} has no commits" stated as fact.
  • Uses: GitHub commits.

G3: beyond pull requests​

Who committed code in the last 30 days without authoring a merged pull request?
  • Good: a list, each person with a commit count, and a note on unmatched commits.
  • Wrong: people who did author merged pull requests in that window.
  • Uses: GitHub commits, and GitHub pull requests.

G4: pipeline failures​

Needs the GitHub Actions context stream registered, with {repo} in its repository list. Skip G4 and G5 if your Admin → Context streams doesn't offer it.

How many workflow runs failed in {repo} last week, and which workflows failed most often?
  • Good: runs, failed runs, and a breakdown by workflow, for that repository. A question about a repository not in the list is answered "not in this stream", not with a zero.
  • Wrong: a zero for a repository the stream doesn't read. A claim about every repository in the organisation.
  • Uses: GitHub Actions.

G5: how long builds take​

How long do workflow runs in {repo} take, and has that changed over the last month?
  • Good: a typical duration from completed runs only, by week or by workflow.
  • Wrong: durations that include runs still in progress.
  • Uses: GitHub Actions.

G6: Copilot​

How many developers used GitHub Copilot last month?
  • Good, in this release: Copilot usage isn't in Prism yet, so there is no figure.
  • Wrong: any figure.
  • Uses: nothing yet.

G7: review speed​

Time to first review for the top PR authors in the last 30 days
  • Good: per author, a median time from opening to first review, in hours, from pull requests that were reviewed.
  • Wrong: a time of zero for a pull request nobody reviewed.
  • Uses: GitHub.

How to run it​

As a person​

Sign in to Prism as usual and ask each question in a new browser tab (a new tab, not a duplicated one), so one answer doesn't lean on the last. When an answer is wrong, press thumbs down and say which prompt it was and what was wrong, in a sentence. That lands on Admin → Answer feedback (Feedback on an answer), with the question, the answer and the sources that produced it.

Feedback can't be saved while you're previewing someone. For group 2, press Copy link on the answer before you stop previewing, and send the link with the prompt id.

With Claude, or a script​

Prism answers a question at GET /ask, streamed as server-sent events. Per-user API keys are not available yet, so a script signs in the way your browser does: with your session cookie.

  1. Sign in to Prism in your browser, and stop any preview first. Open developer tools, then Network, then any request to your Prism address, and copy the value of its Cookie request header into a file, cookie.txt, on one line. Check it contains no prism_preview=: if it does, every question is scoped to the person you were previewing.

  2. Ask one question. It takes two requests, as in the browser. The first sends the question and gets a one-use ticket for it; the second opens the answer with the ticket, and the question stays out of its URL, where a proxy in front of Prism would log it. The ticket lasts a minute. This needs jq.

    Q="What period does this data cover, how current is it, and through what date is it complete?"
    TICKET=$(curl -s -H "Cookie: $(cat cookie.txt)" -H "Content-Type: application/json" \
    -d "$(jq -n --arg q "$Q" '{q: $q}')" \
    "https://{your Prism address}/api/ask/ticket" | jq -r .ticket)
    curl -sN -H "Cookie: $(cat cookie.txt)" -H "Accept: text/event-stream" \
    --get "https://{your Prism address}/ask" \
    --data-urlencode "ticket=$TICKET"

    Every question asked this way starts a new conversation, so no prompt sees another's answers, in this run or an earlier one.

  3. Read the stream. Each event is a line data: {…}. The first, type: meta, carries the answer's turn_id. The answer is the text of the event whose type is done. The event whose type is provenance says which tools and context streams produced it. type: error is a failure, and type: end closes the stream. Do not join the delta events to make the answer: they carry the agent's working notes too. A type: working event, sent at each lookup, is provisional. Its text is what the chat page moves into its Working… block at that lookup, and its upto is where everything moved so far ends, in characters of the joined delta texts. It can cover text that turns out to be the answer, when the agent writes its answer and then looks one more thing up, so done overrides it. When the turn ended in a type: error or was stopped, done's text can hold the notes too. With app.finalAnswerChannel on, which is the default, the notes never reach done's text: they arrive as type: narration events, delta carries the answer as it streams (one with restart: true starts it over). done then also carries answer, the same text as text (or null when the agent handed no answer over), working, the notes, and final_answer, delivered or missing. final_answer is absent when the turn ended before the agent runner said either. upto counts Unicode code points; in JavaScript, slice Array.from(text), not text, since a string's length there counts UTF-16 units. An answer can take several minutes. A type: error saying the page is out of date means the second request still carried q: leave it out.

    The stamp and done events both carry conversation, the id of the conversation the answer is in. To ask a follow-up in the same conversation, send that id as conversation in both requests:

    C=... # the `conversation` from the previous answer's `done` event
    TICKET=$(curl -s -H "Cookie: $(cat cookie.txt)" -H "Content-Type: application/json" \
    -d "$(jq -n --arg q "$Q" --arg c "$C" '{q: $q, conversation: $c}')" \
    "https://{your Prism address}/api/ask/ticket" | jq -r .ticket)
    curl -sN -H "Cookie: $(cat cookie.txt)" -H "Accept: text/event-stream" \
    --get "https://{your Prism address}/ask" \
    --data-urlencode "conversation=$C" --data-urlencode "ticket=$TICKET"

    Prism can drop a conversation started this way once it has had no question for 24 hours, or sooner once you have more than 1,000 such conversations and it is not among the 1,000 most recent. It is dropped the next time Prism records a new conversation for you, and may then no longer be continued. An HTTP 404 means there is no conversation with that id for you to continue: it is older than that, it was reset, or Prism no longer has it. Ask the question again without conversation.

    Every conversation a script starts is kept in the agent runner, with its transcript, until an administrator deletes it, so a battery of 50 questions leaves 50 runner conversations. See Your answers.

    Scripts written for earlier versions name a conversation with session. That still works, but is deprecated: a named conversation is continued only within 15 minutes of its last question, and each answer carries a type: deprecation event saying so.

    No data: lines at all means the request was refused. HTTP 429 means the hourly limit, app.limits.turnsPerHour (60 questions an hour per person by default; a full run asks 50 or more, depending on how many streams you have). A 401, a 403, or a sign-in page means the cookie no longer signs you in, except a 403 saying the question "was not started from Prism's chat page": that one means the ticket was missing, already used, more than a minute old, or for a different question or conversation.

  4. For group 2, as a super admin, add -H "X-Prism-Preview-As: {their email}" to both requests. That previews the person, exactly as Preview as does.

To hand the whole battery to Claude, give it this page, cookie.txt and your filled-in values, and ask it to run every prompt and judge each answer against its Good and Wrong lines. Ask for one result row per prompt:

PromptResultWhyAnswer
S1good / wrong / skippedone sentence, quoting the answer where it went wrong/turn/{turn_id}

The cookie is your sign-in. Treat cookie.txt like a password, keep it on your own machine, and delete it when you're done. It expires when your session does.

An answer asked this way has no thumbs: it was never in a browser chat. Report it by its link instead. Each answer stays at /turn/{turn_id} on your Prism address (Finding an answer again), so send the result table, with those links, to whoever reads your feedback.