OpenAI RAG & Production Patterns · Lesson 6
Entity extraction from long documents
Extract structured data (dates, amounts, names) from PDFs exceeding the context window: token-based chunking with tiktoken, a template prompt with fallback, zip-based result aggregation.