tufu
Start free
Docs menu

Set up

Customizing the Ask console

The docs search box that answers questions in a few sentences and links to the exact pages.

On this page

The Ask console is a search box for your docs site, the <tufu-ask> element. Visitors type a question and get a short answer, a few sentences, plus Read more links to the exact pages (and sections, when your docs have them) the answer came from. It's for finding the right page fast; for conversations there's the support chat.

The Ask console answering "Is my tent under warranty?" in two sentences, with a Read more link to the section of the help center it came from

Setting up the bot#

  1. Add your docs as knowledge, for example your docs site as a Website source.
  2. Make the bot public.
  3. Recommended: set the bot's Mode to Ask console. That's where you set its Suggested questions and the "Still stuck?" chat bot, a support chat the console links to when your docs don't help. Any bot can be shown as a console, though.

Installing it is covered in Installing on your website:

HTML
<tufu-ask team="your-team" bot="your-bot"></tufu-ask>

Inside the support chat#

A support bot can show its own console as a Docs tab of its chat bubble, with no second bot and nothing more to install: in the bot's Look tab, set Tabs to Chat and Docs or Docs and Chat (see Customizing the support chat). In the tab, "Still stuck? Chat with us" is always there, and it switches to the Chat tab with the visitor's question in the message box. The "Still stuck?" chat bot setting only applies to a console on its own.

Using it#

Clicking the box, or pressing ⌘K (Mac) or Ctrl+K anywhere on the page, opens the console in a dialog. Esc, the close button or a click outside closes it. The console keeps its session while the page is open.

Inside the console, Enter asks, ↑ brings back the previous question, and Esc clears the box (or closes the dialog when the box is already empty).

Options#

Attribute Default What it does
team (required) Your team ID.
bot (required) The bot's handle.
placeholder the text set in tufu The text shown in the search box.
hotkey k The letter used with ⌘ or Ctrl to open the console. hotkey="" turns the shortcut off.
open not set Add it to open the console when the page loads.
placement not set placement="bar" shows the console as a pill at the bottom center of every page.
identity not set A signed-in visitor's token, the same as the chat's: see Look it up. Their answers are never cached for anyone else.

From JavaScript: document.querySelector('tufu-ask').show() and .hide().

The appearance studio#

The bot's Look tab (Bots → your bot → Look) styles the console too, with a live preview: switch the preview to Ask console. Your brand color becomes the console's accent (Advanced colors' Visitor bubble sets it too), and the corners and font apply to the search box and the dialog. You can also set the search box text, show your logo above the search box, and on the Scale plan, or on Starter and Team with the brand removal add-on, hide "Powered by tufu". An attribute on the element still wins over the studio.

Styling#

The search box lives in a shadow root, so you style it with CSS variables:

HTML
<style>
  tufu-ask {
    --tufu-ask-width: 20rem;
    --tufu-ask-background: #ffffff;
    --tufu-ask-text-color: #5f6b80;
    --tufu-ask-border-color: #dde3ee;
    --tufu-ask-border-color-hover: #1f9d8b;
    --tufu-ask-radius: 0.625rem;
    --tufu-ask-backdrop: rgba(15, 27, 45, 0.55);
    --tufu-z-index: 100; /* the open dialog; the default sits above the chat bubble (50) */
  }
</style>

The values above are the light-mode defaults; visitors in dark mode get dark defaults unless you set your own. The console follows the visitor's light or dark preference, unless the studio's Theme keeps it light or dark. Its accent is tufu's ink, or your brand color from the studio.

Linking straight to the console#

The console is also a plain page you can link to, or put in your own iframe:

Text
https://tufu.ai/a/your-team/bots/b/your-bot/ask/
https://tufu.ai/a/your-team/bots/b/your-bot/ask/?q=How%20do%20I%20get%20started%3F

The second link asks the question right away.

How answers work#

  • The bot searches your knowledge, answers in about three sentences at most, and cites the passages it used. Links are built only from those passages, never written by the AI, so they always point at real pages in your knowledge.
  • If your docs don't cover a question, the console says so and lists the pages that came closest, plus your "Still stuck?" link when you've set one.
  • Under each answer from your docs, readers can say whether it helped (👍 / 👎). After a 👎 they can say what was wrong (Wrong, Didn't answer my question, Out of date). A 👎 shows up under Knowledge gaps, and offers your "Still stuck?" chat when you've set one.
  • When your bot is paused (your team is out of answers, a limit is reached, or your AI provider turned your key down), the console still searches your docs, without the AI, and says "Answers are paused for now" with the pages that came closest, plus your "Still stuck?" link. These searches never count as answers.
  • Repeated questions are answered instantly from a cache, for a few hours and only until your bot or its knowledge changes. Cached answers never count toward your plan's answers. Every question still shows up in your reports.