1. Home
  2. Knowledge Base
  3. Document Library Pro
  4. Advanced Usage

How to add an AI bot to your document library

To make it even easier for your users to find documents, you can use Document Library Pro with an AI chatbot. This article explains how to train the bot using DocsBot AI. You can also achieve similar results with other chatbots.

It works like this:

  1. First, you train the chatbot on the data from your document library.
  2. You then install the DotsBot AI plugin, which adds a chatbot to your site.

How to train DocsBot AI on Document Library Pro data

Since Document Library Pro stores content as a custom post type, DocsBot AI can be trained on it like any other content in WordPress. You have two main options:

1. Index directly from the front end

If your document library is publicly viewable (i.e. not restricted behind logins), you can just give DocsBot the URLs of your document library pages - ideally the main document library page, and also the single document pages. You can also add your site sitemap or specific page URLs for better coverage.

DocsBot will crawl the pages and extract all the content which is visible on the page

2. Upload structured content directly

Alternatively, you can export the 'Documents' custom post type (e.g. using a plugin such as WP All Export) to CSV or JSON, including the custom fields and taxonomy terms which are attached to the post type. You can then then upload the export file directly to DocsBot as training data.

This approach is a bit more work, but allows DocsBot to index any hidden fields which aren't visible on the front end of your document library.

Can DocsBot read linked downloadable files (e.g. PDFs)?

DocsBot can crawl the contents of the files which are linked from your document library in the following circumstances:

  • File location:
    • The file is stored in the WordPress Media Library, OR;
    • The file is stored on a third party platform (e.g. Google Drive, Dropbox or Microsoft OneDrive) so long as it is publicly accessible and the URL in the document library links to the actual accessible file rather than a preview.
  • File type - the file must be a type which DocsBot can read:
File type Can DocsBot read it? Notes
PDF (.pdf) ✅ Yes Can only read actual text-based content (not just scanned images)
DOC / DOCX ✅ Yes
TXT ✅ Yes
CSV / JSON ✅ Yes If structured properly
HTML ✅ Yes Extracts rendered text from HTML files
RTF ⚠️ Sometimes Not always reliable
Images (e.g., PNG, JPG) ❌ No DocsBot can only read text from images if you manually apply OCR (Optical Character Recognition) beforehand (e.g. using onlineocr.net)
ZIP or other archives ❌ No

For documents that DocsBot cannot access using the front end indexing method, you can convert the file contents to a supported format and upload it to DocsBot directly, or include it in your structured CSV/JSON file.

Usage tips

  • Remember to retrain the bot when your document library changes. You can automate this using the DocsBot API (this is a developer level task. Contact our customization service for a quote if you need help with this).
  • To give the bot extra data, use a custom field plugin like Easy Post Types and Fields to add a "Note" custom field to the Documents post type. You can then import this hidden field to DocsBot, while keeping it hidden from real users.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.