rekhu
← All news

See why the assistant answered wrong, before your users do

rekhu/assistant-laravel 0.9.0, @rekhu/assistant-node 0.6.0 and the widget 0.5.0 add a chat log, a developer view under each answer, and commands that try one action or check them all.

By Rekhu 2 min read

When the assistant in your app gives a wrong answer, the cause is almost always one of its actions: it was refused, it returned more than the assistant can read, or it found another record than you meant. Until now you saw only the answer. This release shows you the actions behind it.

A chat log, next to your app's own. Every question, every action the assistant ran with its input, the outcome and how long it took, and every failure, one line each in storage/logs/rekhu-assistant-YYYY-MM-DD.log. Users appear by their id, never by name, and what the actions returned stays out unless you turn it on. It is on by default and kept 14 days.

A developer view in the chat. In your local environment, each answer shows which actions it ran, what went in and what came back, or why an action was refused. One click shows the result the assistant read. Visitors of a public chat never see it.

Try one action. php artisan rekhu:assistant:try show_order --user=12 --locale=ar --input='{"order":1042}' runs the action as that user, in that language, exactly as the chat does, and prints what the assistant reads. A record that is found in English but not in Arabic shows up in one line.

Check them all. php artisan rekhu:assistant:check --user=12 reads every action and runs the ones that only read: a description too short to use, inputs without a meaning, a list of thousands of rows the assistant can read only part of, a list without paging, a record looked up by another key than its id. It fails when it finds problems, so it can run with your tests.

In Node.js the same comes as npx rekhu-assistant try and check, and as assistant.try() and assistant.checkActions() for your tests. It comes with rekhu/assistant-laravel 0.9.0, @rekhu/assistant-node 0.6.0 and @rekhu/assistant-widget 0.5.0.

Share LinkedIn X

Related

More on the same topics

Try Rekhu Builder on your site

Create a free account, connect a site, drop in a template. Converting is free; only the chat draws from the credit.