-
Book Overview & Buying
-
Table Of Contents
Unlocking Data with Generative AI and RAG - Second Edition
By :
In this chapter, we learned about various components of LangChain that can enhance a RAG application. Code lab 11.1 focused on document loaders, which are used to load and process documents from various sources such as text files, PDFs, web pages, or databases. The chapter covered examples of loading documents from HTML, PDF, Microsoft Word, and JSON formats using different LangChain document loaders, noting that some document loaders add metadata, which may require adjustments in the code.
Code lab 11.2 discussed text splitters, which divide documents into chunks suitable for retrieval, addressing issues with large documents and context representation in vector embeddings. The chapter covered CharacterTextSplitter, which splits text into arbitrary N-character-sized chunks, and RecursiveCharacterTextSplitter, which recursively splits text while trying to keep related pieces together. Lastly, Code lab 11.3 focused on output parsers, which structure the responses from the...