AI / LlamaIndex Interview Questions
What are Documents and Nodes in LlamaIndex?
A Document is LlamaIndex's container for a raw piece of source data, such as an entire PDF, a web page, or a database row, along with any metadata attached to it like a filename or author.
A Node is a smaller chunk produced by splitting a Document, and it's the actual unit that gets embedded, stored, and retrieved. Each Node carries a reference back to its source Document, relationships to neighboring Nodes (previous, next, parent, child), and its own metadata.
| Document | Node |
| Represents a whole source item | Represents a chunk of that item |
| Created by a data loader/reader | Created by a node parser/text splitter |
| Rarely embedded directly | Embedded and stored for retrieval |
This split matters because retrieval works best on small, focused chunks, while metadata and provenance still need to trace back to the original Document.
More Related questions...