Supported document formats in Amazon Q Business
When you add documents to an Amazon Q Business application environment (directly or through data source connectors) using the console or the API, Amazon Q Business extracts document content and internally parses these to optimize chat responses. The maximum file size of a single document must be 50 MB or less. The maximum amount of text that can be extracted from a single document is 5 MB.
When you upload documents directly into chat using the Upload files and chat feature, the size of each file you upload must be 10 MB or less. The total parsed content for all files combined have to be under 30,000 tokens or 20,000 words. One word corresponds roughly to 1.5 tokens.
Additionally, if you’re uploading Comma Separated Values (CSV) or Microsoft Excel (XLS and XLSX) documents directly into chat, Amazon Q Business performs best for tables with approximately 4 columns and 10 rows. Files indexed by an Amazon Q Business data source connector or uploaded directly have no such restrictions.
When you directly add files to Amazon Q Business using the Using direct document upload or the Upload files and chat feature, it considers each file you add a document. When you connect Amazon Q Business to a data source, what Amazon Q Business considers—and crawls—as a document varies by connector.
Along with specific formats like PDF, Word, for example, each enterprise data source also has different entities that it considers documents. To learn about supported entity types for each data source, see What is a document?.
Topics
Supported document types
The following table shows the document formats that Amazon Q Business supports.
Document format | How document is treated |
---|---|
Portable Document Format (PDF) | If you're using a data source connector, or directly uploading documents into your application, optical character recognition (OCR) is supported for PDFs up to 3000 pages. If your PDF is more than 3000 pages, OCR isn't supported and only plaintext is extracted. If you're directly uploading documents into chat, OCR on scanned PDFs isn't supported. Instead, PDFs are converted to HTML, then plaintext is extracted. |
HyperText Markup Language (HTML) | HTML tags are filtered out to extract plaintext. Content must be
between the main HTML start and closing tags
(<HTML>content</HTML> ). |
Extensible Markup Language (XML) | XML tags are filtered out and plaintext is extracted. |
Extensible Stylesheet Language Transformations (XSLT) | Tags are filtered out to extract plaintext. |
Markdown (MD) | Content is extracted as plaintext with Markdown syntax retained. |
Comma Separated Values (CSV) | Content is extracted as plaintext from each cell, with a single file treated as a single document result. Amazon Q Business doesn't support analytics questions for CSVs; it supports only qualitative questions. |
Microsoft Excel (XLS and XLSX) | Content is extracted as plaintext from each cell, with a single row treated as a single document result. Amazon Q Business doesn't support analytics questions for Excel files; it supports only qualitative questions. |
JavaScript Object Notation (JSON) | Content is extracted as plaintext with JSON syntax retained. |
Rich Text Format (RTF) | RTF syntax is filtered out to extract plaintext content. |
Microsoft PowerPoint (PPT, PPTX) | Only plaintext content is extracted from PowerPoint slides for ingestion. Images and other content aren't extracted. |
Microsoft Word (DOCX) | Only plaintext content is extracted from Word pages for ingestion. Images and other content aren't extracted. |
Plain text (TXT) | All text in the text document is extracted. |