Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Data-Driven Applications with LlamaIndex

You're reading from   Building Data-Driven Applications with LlamaIndex A practical guide to retrieval-augmented generation (RAG) to enhance LLM applications

Arrow left icon
Product type Paperback
Published in May 2024
Publisher Packt
ISBN-13 9781835089507
Length 368 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Andrei Gheorghiu Andrei Gheorghiu
Author Profile Icon Andrei Gheorghiu
Andrei Gheorghiu
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1:Introduction to Generative AI and LlamaIndex FREE CHAPTER
2. Chapter 1: Understanding Large Language Models 3. Chapter 2: LlamaIndex: The Hidden Jewel - An Introduction to the LlamaIndex Ecosystem 4. Part 2: Starting Your First LlamaIndex Project
5. Chapter 3: Kickstarting Your Journey with LlamaIndex 6. Chapter 4: Ingesting Data into Our RAG Workflow 7. Chapter 5: Indexing with LlamaIndex 8. Part 3: Retrieving and Working with Indexed Data
9. Chapter 6: Querying Our Data, Part 1 – Context Retrieval 10. Chapter 7: Querying Our Data, Part 2 – Postprocessing and Response Synthesis 11. Chapter 8: Building Chatbots and Agents with LlamaIndex 12. Part 4: Customization, Prompt Engineering, and Final Words
13. Chapter 9: Customizing and Deploying Our LlamaIndex Project 14. Chapter 10: Prompt Engineering Guidelines and Best Practices 15. Chapter 11: Conclusion and Additional Resources 16. Index 17. Other Books You May Enjoy

Using the LlamaHub data loaders to ingest content

Apart from the Wikipedia reader that we discussed in the previous chapter, to get a better understanding of how data readers work, let’s look at a few more examples of LlamaHub readers that we can use to ingest data.

Ingesting data from a web page

SimpleWebPageReader can extract text content from web pages.

To use it, we must first install the corresponding integration:

pip install llama-index-readers-web

Once installed, it’s really easy to use:

from llama_index.readers.web import SimpleWebPageReader
urls = ["https://docs.llamaindex.ai"]
documents = SimpleWebPageReader().load_data(urls)
for doc in documents:
    print(doc.text)

This loads and displays the text content of the specified web pages into documents.

At its core, SimpleWebPageReader serves as a bridge between the vast, unstructured world of the internet and the structured environment of the LlamaIndex RAG pipeline...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime