Study
LangChain · Document loaders
The Document object (page_content + metadata), writing a small custom loader for text and CSV files, and why metadata matters later for filtering and citing sources.
- A loader's only job is to turn some source into Document objects: text plus metadata.
- Metadata like source file and row number is what lets a RAG answer cite where it came from.