All tools / AI quality & safety
answergrade
Grade your chatbot's answers against its own sources, and measure retrieval before you ship a change.
Buy answergrade for $99One payment of $99, plus sales tax where it applies, and every future update. Delivered as a private GitHub repository you're invited to.
Runs inside Lina. Extracted from the answer grading that checks Lina's own chat answers against its knowledge base.
See it work
answergrade eval --chunks chunks.jsonl --cases cases.jsonl | head -n 10
Retrieval eval: built-in keyword (12 cases, k=5)
recall@1: 0.917
recall@5: 0.917
MRR: 0.917
by kind:
inflection n=2 recall@5 1.000 MRR 1.000
lexical n=7 recall@5 1.000 MRR 1.000
paraphrase n=2 recall@5 1.000 MRR 1.000
synonym n=1 recall@5 0.000 MRR 0.000
missed (no expected chunk in the top 5): 1
answergrade probe --questions questions.jsonl --bot http://127.0.0.1:8421/chat --judge stand-in --facts facts.txt --out run.json | head -n 14
answergrade: using the stand-in judge (rules, not a model): for trying answergrade only
answergrade probe
2 of 8 graded answers passed (25%). 6 flagged, 0 with no answer.
flagged by kind: contradiction 4, fabricated_action 1, fabrication 1
sources: 7 from the bot, 0 from retrieval, 1 with none
by topic:
account asked 3 flagged 2 no answer 0 not graded 0
apps asked 2 flagged 1 no answer 0 not graded 0
billing asked 2 flagged 2 no answer 0 not graded 0
support asked 1 flagged 1 no answer 0 not graded 0
What to fix:
FIX #1 The answer contradicts source plans#1
The answer says $10, which the sources do not. The source says: "Plus costs $8 per month with unlimited notebooks and 10 GB of storage."
What it does
answergrade measures recall@k and MRR for your search and fails a change that makes retrieval worse. A cautious AI judge grades each answer against the sources your bot used, and the report says what to fix. It also plans a knowledge-base cleanup and lists what visitors say is wrong.
- Retrieval numbers with a regression gate
- Reports recall@1, recall@k and MRR for any search function, whether it returns text, ids or records. Save a baseline, and a change that drops a metric beyond your threshold exits non-zero.
- Vector coverage you can trust
- Counts only chunks that have a usable vector (present, numeric, non-zero, the right length), so semantic search over an empty or partial cache is caught.
- A cautious AI judge
- The judge is told to flag only clear contradictions of your sources, invented details and claimed actions. A garbled, cut-off, hedged or self-contradicting reply is marked could not grade, never flagged; a well-formed verdict is taken as given, so read the flags. A verdict of {"flag": false} with a category the model invented is graded as a pass, not as could not grade. The judge is any function from prompt to text; there is no vendor SDK.
- A report that says what to fix
- Asks your bot over HTTP or as a Python function, grades each answer against the sources it returned or cited, and writes a text, JSON or HTML report with a fix card for each problem.
- Question sets from your logs
- Builds a probe set from chat logs, with greetings, thanks, quoted email history and duplicates removed, or generates questions spread across all your sources.
- Citation and gap counters
- Tracks which sources your bot cites and which have gone quiet, and records unanswered questions with emails, phone numbers, amounts and long digit runs scrubbed first.
- A cleanup plan for the knowledge base
- kb-lint reads a store from JSONL, a JSON list or a folder and plans the cleanup: exact duplicates, test rows, email-blast markup, tracking-wrapped and unsubscribe links, control characters, transcripts, and active cards whose titles overlap but whose bodies differ. It only plans. It never deletes or changes your store.
- What visitors say is wrong
- reported-errors reads conversations for visitors saying something you publish is wrong. It matches each complaint to a subject from a small editable table and to the bot's most-cited sources by file name, and counts people, not messages. It fires on phrases, so review what it lists.
- Check the judge before you trust it
- judge-check runs ten answers with known grades through the model you chose, and switches handle endpoints that reject max_tokens, temperature or JSON mode.
What you get
answergrade 1.1.3: the Python library and the answergrade command, with a stand-in help bot to try it on, with 576 automated tests.
A commercial license. Use it and change it in your own projects and your clients' projects. Don't share or resell the source. Read the license.
Every update. New versions land in the same repository; git pull to get them.
Requirements
Python 3.10 or newer. The Python standard library. The [http] extra adds httpx.
How buying works
- Enter your GitHub username. You'll see the account before you pay, so you can check it's yours.
- Pay $99, plus any sales tax shown at checkout, on Stripe's checkout page.
- Accept the invitation GitHub emails you. Signed in as that account, you'll also find it at
github.com/dominares-tools/answergrade/invitations. Invitations expire after 7 days; you can get a new one any time. - Clone and install:
git clone https://github.com/dominares-tools/answergrade.gitPrivate repo: sign in to GitHub on this computer first. Run
gh auth loginand choose HTTPS, or give git a personal access token when it asks for a password. To use an SSH key instead, clonegit@github.com:dominares-tools/answergrade.git.python3 -m venv .venv && . .venv/bin/activate pip install ./answergrade
Questions
Do I need GitHub?
Yes. Access is a read-only invitation to a private repository, sent to the GitHub account you choose.
Can I get a refund?
Yes, within 14 days, no questions asked. Access ends when the refund goes through. Refund policy.
Who takes the payment?
Payments are handled by Stripe, which works out sales tax. Your receipt and card statement show Link (LINK.COM*), Stripe's checkout service.
Something wrong?
Email support@dominares.org. Every buyer of a tool shares its repository, so support happens by email rather than in GitHub issues.