Kensa demo: a handbook bot with 3 planted bugs
A small handbook bot with three planted bugs: it answers vacation questions from memory (24 days) instead of the documents (30), it only reads the first 3 documents, and one run in three it adds a sentence the documents don't support. Every input ran 3 times. Card 5 shows the cut-off: shrinking can't remove the 3 documents in front of the parking one, because the bot only fails while that document is 4th. This page is Kensa's real output (python examples/toy/demo.py). Code on GitHub · Nancy Singh
| Invariant | Violations | What it means |
|---|---|---|
correct | 2 | The expected answer is in the documents, but the app didn't give it. |
follows_update | 2 | The document was edited, and the app kept the old value. |
refuses_when_missing | 1 | The document with the answer was removed, and the app still answered. |
grounded | 1 | The answer says things the retrieved context doesn't support. |
1. correct
expected '30' in the answer
Expected: 30
- Employees get 30 days of paid vacation per year, plus public holidays.
2. refuses_when_missingevidence removed
the evidence was removed, but the app answered instead of saying it doesn't know
A: Employees get 24 days of paid vacation per year.
A: Employees get 24 days of paid vacation per year.
- The office is open from 9 am to 6 pm on weekdays.
- Employees get 30 days of paid vacation per year, plus public holidays.
3. follows_updatefact changed: 30 -> 63
the document now says '63'; the answer doesn't
A: Employees get 24 days of paid vacation per year.
A: Employees get 24 days of paid vacation per year.
- Employees get 30 days of paid vacation per year, plus public holidays.
4. groundedflaky: fails 2/3 runs
1 sentence(s) not supported by the context, e.g. 'This policy was updated by the board in 2019.' (unsupported, support 0.00)
Expected: 3
- Laptops are replaced every 3 years by the IT team.
5. correct
refused, but the answer (120) is in the documents
Expected: 120
- The office is open from 9 am to 6 pm on weekdays.
- Employees get 30 days of paid vacation per year, plus public holidays.
- Laptops are replaced every 3 years by the IT team.
- The parking garage has 120 spaces for staff.
6. follows_updatefact changed: 120 -> 243
the document now says '243', but the app refused
A: I don't know based on the handbook.
A: I don't know based on the handbook.
- The office is open from 9 am to 6 pm on weekdays.
- Employees get 30 days of paid vacation per year, plus public holidays.
- Laptops are replaced every 3 years by the IT team.
- The parking garage has 120 spaces for staff.