Skip to content

feat: add Amazon Textract integration (#2391) - #3148

Merged
bogdankostic merged 13 commits into
deepset-ai:mainfrom
zafatar:main
May 22, 2026
Merged

feat: add Amazon Textract integration (#2391)#3148
bogdankostic merged 13 commits into
deepset-ai:mainfrom
zafatar:main

Conversation

@zafatar

@zafatar zafatar commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Add AmazonTextractConverter component that extracts text from images and single-page PDFs using the AWS Textract synchronous API. Supports both DetectDocumentText (plain OCR) and AnalyzeDocument (tables, forms, signatures, layout) as well as natural-language queries. Includes CI workflow, unit/integration tests, pydoc config, and repo-level wiring (labeler, coverage comment, README).

Related Issues

Proposed Changes:

Similar to the other converter tools such as Azure Document Intelligence or other Amazon resources such as Amazon Bedrock, it covers the access to the Amazon Textract by using boto3 and AWS credentials from the environment variables.

How did you test it?

The tests are run as two separate groups:

cd ./integrations/amazon_textract
hatch run test:unit
hatch run test:integration

Notes for the reviewer

Checklist

Add AmazonTextractConverter component that extracts text from images and single-page PDFs using the AWS Textract synchronous API. Supports both DetectDocumentText (plain OCR) and AnalyzeDocument (tables, forms, signatures, layout) as well as natural-language queries. Includes CI workflow, unit/integration tests, pydoc config, and repo-level wiring (labeler, coverage comment, README).
@zafatar
zafatar requested a review from a team as a code owner April 13, 2026 12:37
@zafatar
zafatar requested review from bogdankostic and removed request for a team April 13, 2026 12:37
@github-actions github-actions Bot added topic:CI type:documentation Improvements or additions to documentation labels Apr 13, 2026
@CLAassistant

CLAassistant commented Apr 13, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@bogdankostic bogdankostic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR @zafatar! It looks already good to me, I just left a few minor comments on how it can be further improved.

When provided, the Textract ``QUERIES`` feature type is enabled
automatically and each question is sent as a query. Answers are
included in the raw Textract response. Example:
``["What is the patient name?", "What is the total due?"]``

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use single backticks here.

Suggested change
``["What is the patient name?", "What is the total due?"]``
`["What is the patient name?", "What is the total due?"]`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file will be generated automatically once we do the release, so we can remove it here.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add some checks that warning messages are raised for cases that go wrong.

@bogdankostic

Copy link
Copy Markdown
Contributor

Hi @zafatar, quite some time has already passed since you opened this PR. Do you intend to finish it or should a maintainer take over?

@bogdankostic bogdankostic left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took care of the few open points.

@bogdankostic
bogdankostic merged commit 4582a32 into deepset-ai:main May 22, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration:amazon-textract topic:CI type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants