Skip to content

Count the questions and the reported answers of the Ask BIIGLE chat - #5

Open
dlangenk wants to merge 1 commit into
mainfrom
claude/question-incorrect-answer-metrics-5121bf
Open

dlangenk wants to merge 1 commit into
mainfrom
claude/question-incorrect-answer-metrics-5121bf

Conversation

@dlangenk

@dlangenk dlangenk commented Sep 7, 2026

Copy link
Copy Markdown
Member

What

Two new event types, ask_biigle_asked_question and ask_biigle_reported_answer, plus the listeners that report them and an "Ask BIIGLE Events" panel on the metrics admin page.

The counterpart is biigle/ask-biigle#27, which emits ask-biigle.asked_question and ask-biigle.reported_answer on the global event bus. Neither PR counts anything on its own.

Why

There was no way to tell how much the chat of biigle/ask-biigle is actually used or how often its answers are wrong. This module already collects such counts for LabelBOT, so the chat reuses it instead of bringing a counter of its own. Only the counts are stored — no content of a question or answer.

Notes for the reviewer

  • The annotationsScripts view mixin is replaced by navbarMenuItem. The chat is part of the navbar and available on every page, so the listeners have to load there. The annotation tool renders the navbar as well, which is why the old mixin is gone instead of being kept alongside the new one: both would have loaded main.js twice on that page. LabelBOT events keep being counted, as annotationsScripts was used by the annotation tool only. The mixin renders no menu item of its own, it only pushes the script.
  • The two Ask BIIGLE counts are independent and not parts of a whole, unlike the LabelBOT events, so the admin page shows them as a table and not as a pie chart.
  • AdminController gained a small eventData() helper so both groups build their data the same way.
  • The public assets were rebuilt with npx vite build.

🤖 Generated with Claude Code

There was no way to tell how much the chat of biigle/ask-biigle is actually used
or how often its answers are wrong. The chat emits an event when a question is
sent and when an answer is reported as incorrect, which this module now listens
on and counts like the LabelBOT events.

The listeners were loaded on the annotation tool only, but the chat is part of
the navbar and available on every page, so they are loaded from a navbar mixin
now. The annotation tool has a navbar as well, which is why the mixin of the
annotation tool is gone instead of being kept next to the new one: both would
have loaded the script twice there.

The two counts are independent and not parts of a whole, unlike the LabelBOT
events, so the admin page shows them as a table and not as a pie chart.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant