### **Input** Raw knowledge base files of multiple modalities, including but not limited to: - **Text-based:** PDFs, Word documents (DOCX), PowerPoint (PPTX), TXT, CSV, Markdown, HTML - **Visual:** JPG, PNG, scanned PDFs - **Audio:** MP3, WAV - **Video:** MP4 (with audio track) Files may originate from internal repositories, user uploads, web crawls, or shared storage, and may contain inconsistent formatting, tables, headers, footers, images, timestamps, or transcription artifacts. --- ### **Details** The goal of this task is to extend the existing ingestion pipeline to support **multi-type file inputs**, converting all supported formats into **clean, structured text** suitable for downstream chunking and embedding, while preserving **traceability and modality-specific metadata**. Each file type should be handled using the most appropriate extraction method: - Text documents via LangChain loaders and Unstructured.io - Images and scanned PDFs via OCR - Audio/video via transcription (timestamps preserved) - CSV files converted into readable row-based or column-based textual representations The focus is on **normalization, not abstraction**. No summarization or semantic compression should occur at this stage. All meaningful content must be retained, readable, and attributable to its original source. Only disruptive artifacts introduced during extraction should be removed (e.g., broken encoding, duplicated boilerplate, unreadable symbols). Structural metadata such as page numbers, slide numbers, row indices, or timestamps must be preserved so downstream steps can reference exact source locations. **Example (raw → cleaned structure):** ``` RAW AUDIO TRANSCRIPT: [00:01:12] Speaker1: Employees are entitledto parental leaveof upto12 weeks. [00:01:35] Speaker1: Eligibility requirements include... CLEANED STRUCTURED OUTPUT: doc_id: HR_Policy_Audio_2024 timestamp:00:01:12 speaker: Speaker1 content: Employees are entitledto parental leaveof upto12 weeks. doc_id: HR_Policy_Audio_2024 format_type: transcript timestamp:00:01:35 speaker: Speaker1 content: Eligibility requirements include... ``` --- ### **Output** Cleaned, structured text entries for all supported file types, stored in a standardized format with metadata such as: - Document ID - Source type (pdf, image, audio, csv, etc.) - Page number, row index, slide number, or timestamp This output is passed directly to the chunking step.