📄️ Data Ingestion Pipeline
The ingestion pipeline is built around resilience, scalability, and domain sensitivity. Documents are streamed from MongoDB using a generator pattern to prevent memory exhaustion. Each document undergoes structured parsing, particularly in the case of legal acts where nested hierarchies (chapters, sections, amendments, schedules) must be recursively extracted.