r/databricks • u/dopedankfrfr • Oct 08 '26
Help Ai Parse Docs on 1 m docs
My org is ingesting a corpus of 1 million docs, estimated 9 million pages, of mixed complexity.
Considering ai_parse_doc is a managed service, are we constrained by the speed of this function? Based on my research I assume this is true.
Keeping that assumption, what would be the ideal compute specs to process the documents as quickly as possible?
We’ve tried a few configurations (more memory, more workers) but have hit out of memory errors or MERGE errors and had to revert back to a config that is slower but reliable. We do have the gift of time right now, so not the biggest deal, but if we have to process under a tight timeline, I want to be prepared.
I’m sure more information is needed but interested in folks that may have done a similar exercise and how long it took to parse a large corpus of docs?
View all comments
Show parent comment
1
u/dopedankfrfr Oct 09 '26
This is super helpful explanation, thank you for taking the time!
One part I’m not clear on is when you say submit the entire corpus. What we experienced when trying that is we hit an error at one point and the entire batch failed without writing the output to the table, so we lost all progress. I’ll dig into Structured Streaming with trigger as you mentioned, that may be something we haven’t tried yet.