Skip to content

Give support triage the catalog and the last AI call - #1183

Merged
helpcodeai merged 1 commit into
mainfrom
fix/support-ai-accuracy
Oct 21, 2026
Merged

helpcodeai merged 1 commit into
mainfrom
fix/support-ai-accuracy

Conversation

@helpcodeai

Copy link
Copy Markdown
Contributor

Summary

Two support chats this week, both about the Telegram connector, show the support AI giving wrong answers:

  • The triage's suggested reply, and the assistant after it, said we have no Telegram connector. The catalog has telegram-bot, but the triage only saw the workspace's own connector count.
  • The OAuth redirect URI was given to a user setting up a Telegram bot token, and as the URL for connecting an AI client.
  • A user had the connector set up correctly and simply had not connected an AI client yet: 0 tool calls ever. Nothing in the snapshot showed that, so the assistant kept repeating the token steps.

Changes

  • support-catalog.ts: the listed catalog connectors that a customer names in their messages. Every content word of a name or alias must appear in the text, so "telegram" finds Telegram Bot and "google" alone does not pull in every Google connector. The list is capped at 6. Each match is passed to the triage with its setup page.
  • Workspace snapshot (contact attributes):
    • new connector_names (bounded);
    • new last_tool_call: the day of the last successful tool call, or never. Its query is filtered by the organization.
  • Triage prompt: rules for each of these facts (catalog line means we have the connector; installed but never means connect an AI client; redirect URI only for OAuth connectors; pasted secrets). The private note shows the connector names and the last AI call.

Done outside this PR, on the support desk (not in the repo):

  • the two new contact attributes (plus email_verified, which was set but never declared);
  • the Libredesk assistant's instructions and guardrails now follow the same rules, and hand off to a person when a secret is pasted.

Code lives in ee/support, as decided for the support chat. Cloud only: the triage runs where the Libredesk key is set. Dedicated instances only send the snapshot.

Type

  • Bug fix

Testing

  • Added/updated unit tests:
    • support-catalog.spec.ts covers a match in English and Russian, multi-word names, no match, and the prompt line.
    • Identity spec: names, last call date, never, organization filter.
    • Triage spec: the catalog line and the redirect rule are in the prompt.

Commands (in packages/backend):

  • npx jest src/ee/support src/adapters/catalog-search.spec.ts: 73 passed.
  • npx tsc --noEmit -p tsconfig.json: passes.
  • npx eslint src/ee/support: passes.

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • This PR has a descriptive title

The triage only saw the workspace's own connectors, so it told two
customers we had no Telegram connector when the catalog has one, and it
handed out the OAuth redirect URI for bot-token connectors. It now gets
the catalog connectors named in the messages, the installed connectors'
names and the day of the last successful tool call ("never" = no AI
client connected), with rules for each.
@helpcodeai
helpcodeai enabled auto-merge (squash) October 21, 2026 10:13
@helpcodeai
helpcodeai merged commit 3df6f11 into main Oct 21, 2026
20 of 21 checks passed
@helpcodeai
helpcodeai deleted the fix/support-ai-accuracy branch October 21, 2026 10:15
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant