Azure-Samples / azure-search-openai-demo

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
https://azure.microsoft.com/products/search
MIT License
6.37k stars 4.25k forks source link

How to disable OCR in prepdocs script? #1958

Open egor-yudkin opened 2 months ago

egor-yudkin commented 2 months ago

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [x] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

  1. Run prepdocs.sh script on some PDF files that contain images
  2. Text from images embedded gets indexed

Any log messages given by the failure

n/a

Expected/desired behavior

I'd like to have a way to disable OCR of the images embedded in PDF files. Our use case is the application and training documentation that includes screenshots of application screens with random/example data displayed and we don't want it to be in the index.

OS and Version?

Linux Ubuntu

Versions

2024-08-23

pamelafox commented 2 months ago

I asked the Document Intelligence team, and they say there's no option for disabling OCR in the API. You would need to update the parsing code to ignore the text parsed from images. I haven't done much Doc Intelligence parsing code myself, but I'm hoping that it's returned back in a way that you can delineate image text versus the other text.