Website knowledge

Updated at:

This document explains how to add, bind, refresh, view, delete, and edit website knowledge in a robot space.

Important
  • Alibaba Cloud Conversational AI does not support crawling websites that use asynchronous loading or a decoupled front-end and back-end architecture. Web pages to be crawled must not require login authentication, meaning they must be publicly accessible without requiring login credentials. The crawler starts from the single website URL you provide, crawling that page and up to 30 additional hyperlinks on the same domain. If a website requires authentication, the crawl will fail, and this attempt will not count towards your crawl quota.

  • You must ensure that your use of this web page parsing tool complies with all applicable laws and regulations, the terms of service of the target platform, and the legal rights of content owners. As the tool provider, Alibaba Cloud Conversational AI assumes no liability for your parsing or downloading activities.

Overview

Website knowledge consists of text content crawled from specific web pages. After you add website URLs to Alibaba Cloud Conversational AI, the system's crawler fetches content from those pages and any linked pages on the same domain. Your robot then uses this content as a knowledge source.

Add website knowledge

Note

The number of websites you can add depends on your business space edition. For example, the Enterprise Edition supports up to 10 websites. For details on resource limits and free quotas for each edition, see Resource limits and free quotas.

  1. Log on to the Alibaba Cloud Conversational AI Console, navigate to your target robot space, and choose Knowledge Base > Website Knowledge.

  2. Click Add Website. Fill in the Website URL, URL filtering, XPath, and content filtering, and select a scheduled update method (the Trial Edition does not support scheduled updates).

    • Scheduled update: Automatically re-crawls the website to keep its knowledge current. Options include Do not update, Update every day, Update every week, and Update every month.

    • URL filtering: Filters the URLs to crawl by using a regular expression. You can add up to 10 filter conditions. Only URLs that match a filter expression will be parsed. For example, to parse the URL http://www.xxx.com/abc/123/index.html, you could set the filter to:

      http://www.xxx.com/[a-z]*/[0-9]*/index.html
    • XPath: Uses XPath rules to extract additional hyperlinks from a web page. You can add up to 10 XPath selectors. By default, the crawler extracts links from standard <a href...></a> tags. For example, to extract a link from the tagname attribute in <a style="test" onclick="query()",tagname="/abc/123/index.html">External Link</a>, you can set the XPath rule to //a/@tagname.

    • Content filtering: Extracts specific content from a web page by using a CSS selector. You can add up to 10 selectors. By default, the crawler extracts all text content within the <body> element. For example, to extract only the content from a <div> with the class article, as in <div class="article">Web page content</div>, set the selector to div.article.

  3. Click Next to go to the web page parsing settings. Configure the document chunk length and set the hierarchical parsing mode.

    • Document chunk length: The maximum character limit for a single document chunk. The maximum is 800 characters per chunk.

    • Hierarchical parsing mode (Rule-based parsing): Identifies the hierarchical structure of paragraphs by using predefined or custom rules for document titles.

      Note

      The hierarchical parsing mode for website knowledge is the same as that for document knowledge. For details on parsing rules and configuration, see document parsing rules.

  4. Click OK to start crawling the web page content. Click Test Crawl to preview the results.

  5. The default website name may not be descriptive. You can click the edit icon next to a website name to rename it. To the right of the website URL, click Delete to remove the website, View to inspect the crawled content from that URL and its linked pages, or Retry to crawl the website again. Because fetched website knowledge is a point-in-time snapshot, refresh it when the source content changes to keep it current.

Bind website knowledge

Binding lets you associate a robot in a robot space with existing website knowledge from your business space. Follow these steps:

  1. Log on to the Alibaba Cloud Conversational AI Console, navigate to your target robot space, and choose Knowledge Base > Website Knowledge.

  2. Click Bind Existing Websites and select the checkboxes for the websites you want to bind.

  3. Click OK. The robot will then use the knowledge from the selected websites.