Q&A voice assistant

With the Q&A service provided by Alan, you can build an intelligent and context-aware Q&A voice assistant to automate responses to common question and queries.

The Q&A service adds a conversational layer on top of your existing content — knowledge base, manuals, FAQ pages and other types of articles. It can leverage both user-facing and internal documentation and resources to help you to:

  • Handle frequent users’ requests and provide 24/7 automated support

  • Onboard new customers and employees

  • Provide guidelines, train personnel and so on

Defining Q&A content

To build a Q&A voice assistant with Alan, use the corpus() function. In the function, define a list of links to retrieve information from and the crawl depth:

Voice script
corpus(
    {url: "https://alan.app/", depth: 2},
    {url: "https://alan.app/docs", depth: 3},
    {url: "https://alan.app/blog/", depth: 2}
);

You can add the content for the Q&A voice assistant directly to the corpus() function:

Voice script
corpus(
    `Alan AI is a comprehensive Voice AI Platform to create and manage intelligent and contextual in-app voice assistants`,
    `With Alan, a voice experience for your app can be built and developed by a single developer, rather than a team of Machine Learning and Dev Ops experts.`
);

The Q&A service supports the mixed data mode. In this case, the service will create a separate index for data sources added to different corpus() functions and will use all created indices to conduct the dialog with the user.

Voice script
corpus(
    {url: "https://alan.app/", depth: 2},
    {url: "https://alan.app/docs", depth: 3},
    {url: "https://alan.app/blog/", depth: 2}
);

corpus(
    `Alan AI is a comprehensive Voice AI Platform to create and manage intelligent and contextual in-app voice assistants`,
    `With Alan, a voice experience for your app can be built and developed by a single developer, rather than a team of Machine Learning and Dev Ops experts.`
);

Once you save the voice script, Alan will crawl the specified websites and retrieve the content to be used by the Q&A voice assistant. After that, users will be able to communicate with it to get answers to their questions.

Note

Mind the following:

  • Make sure the websites and pages you define in the corpus() function are not protected from crawling. Otherwise, Alan will not be able to get content from these resources.

  • Do not add URLs and text strings to the same corpus() function. Otherwise, the information provided in text strings will be ignored.

../../_images/qna.png

Setting the crawl depth

The crawl depth defines how ‘far’ down the website hierarchy the Alan crawler must go to retrieve the content for your Q&A voice assistant.

For example, if you set the crawl depth to 1, the crawler will access the page available by the start URL, get all unique links to other pages in the same domain from this page and retrieve information from the start page and the linked ones.

Set the crawl depth wisely. The deeper the level is, the higher the chance is that users will get more accurate answers to their questions. However, a great crawl depth may affect the Q&A service performance.