Skip to content

Prompt caching when Bedrock used for OCR and Extraction #269

@kaleko

Description

@kaleko

In the situation where the IDP stack is using Bedrock for OCR and also Bedrock for extraction, no prompt caching is used. Assuming the same LLM is used for each, this is an opportunity for improvement.

Implementing this would involve restructuring the OCR and Extraction prompts to start with the same prefix (probably something like: "here is an image of a page: {IMAGE}"), then adding a cache point immediately after.

I expect this will be easy to implement but perhaps more arduous to verify that it doesn't negatively impact accuracy.

https://deepwiki.com/search/if-i-use-bedrock-for-ocr-it-wi_3259f96e-c288-4288-b00c-80967d8708c1?mode=fast

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions