StudyVisuallyStart studying
Part 06 · LangChain / LangGraph · Card 3 of 14

Document loaders

Ready-made readers for PDFs, web pages, GitHub repos, Notion and more.

Last updated

Analogy

Like multer for every file format you'll ever be asked to support.

In an agent

Loaders feed the indexing step that builds your agent's searchable library.

Questions people ask

What are document loaders in LangChain?

Document loaders are ready-made readers that turn sources such as PDFs, web pages, GitHub repos or Notion pages into text documents with metadata. They are the first step of indexing for RAG. Without them you would write a separate parser for every file format and service you need to support.

Where do document loaders fit in a RAG pipeline?

At the very start. A loader reads the raw source into documents, a text splitter cuts them into chunks, an embedding model turns each chunk into a vector, and a vector store saves them. Later, a retriever searches that store. Loaders only run during indexing, not when questions are asked.