PDF hierarchy extraction not fully done stops abruptly with partial output

I have a pdf roughly 2 MB having 20 to 30 pages max. Using gpt4-turbo model.

When I pass the pdf asking to format in specific way section, sub section, title as per pdf structure it does for 2 pages and stops.

How do I get it for entire document. I need to pass the entire document for model to get the full context and continuity across pages.

I tried to split pdf as pages to pass to model and later tried to assemble it my self…still it stops at some random point with full completion of documents.

What am I missing or is there different way to prompt. 128k is large context for my doc should be easily manage able.

1 Like