Prev Next

AI / LlamaIndex Interview Questions

Explain the lifecycle of a Node from Document to retrieval?

A Node passes through several distinct stages between when raw data enters LlamaIndex and when it's finally used to answer a query.

flowchart LR A[Document loaded by a reader] --> B[Node parser splits into Nodes] B --> C[Relationships assigned: PREVIOUS/NEXT/PARENT/CHILD] C --> D[Optional metadata extractors add title/summary/etc.] D --> E[Embedding model embeds Node text] E --> F[Node stored in docstore + vector store] F --> G[Retriever fetches Node at query time] G --> H[Node postprocessors filter/rerank] H --> I[Response synthesizer consumes Node text]
  1. A reader, such as SimpleDirectoryReader, loads raw data into a Document with base metadata like file_name.
  2. A node parser splits the Document into one or more Nodes, sized according to chunk_size and chunk_overlap.
  3. Each Node is assigned relationships to its neighbors and source Document via the NodeRelationship enum, so context and provenance aren't lost after chunking.
  4. Optional metadata extractors, like a title or summary extractor, enrich the Node with additional derived metadata.
  5. The embedding model converts the Node's text into a vector.
  6. The Node and its vector are persisted into the docstore and vector store respectively.
  7. At query time, a retriever fetches the Node, it may pass through postprocessors, and finally its text reaches the response synthesizer to help produce an answer.
Relationships like PREVIOUS, NEXT, PARENT, and CHILD on a Node exist to:
Which stage happens immediately before a Node is stored in the vector store?

More Related questions...

What is LlamaIndex? What is the purpose of LlamaIndex in a RAG pipeline? What are Documents and Nodes in LlamaIndex? What is a VectorStoreIndex? What are the types of indices in LlamaIndex? What is a query engine in LlamaIndex? What is a retriever in LlamaIndex? What is a response synthesizer? What is Settings in LlamaIndex? What is a node parser or text splitter in LlamaIndex? How do you use SimpleDirectoryReader? What is LlamaHub? Describe the ingestion pipeline in LlamaIndex? What is a chat engine in LlamaIndex? What are the response modes available in LlamaIndex query engines? What is the difference between VectorStoreIndex and SummaryIndex? How does similarity_top_k affect retrieval? What is the difference between a query engine and a chat engine? How do node postprocessors work in LlamaIndex? Why should you use metadata filtering in retrieval? What is the difference between refine and compact response modes? How does the SubQuestionQueryEngine work? What is a RouterQueryEngine and when would you use it? Why is chunk size important in LlamaIndex? How do you persist and reload an index in LlamaIndex? What is the difference between LlamaIndex and LangChain? How does the SentenceWindowNodeParser improve retrieval quality? When should you use auto-merging retrieval? What is HyDE and how does it help retrieval? How do you integrate a custom vector store like Pinecone or Chroma with LlamaIndex? What is the difference between ReActAgent and FunctionCallingAgent? How does LlamaIndex support structured data querying such as SQL? Why use CohereRerank or LLMRerank as a node postprocessor? What is the role of the CallbackManager in LlamaIndex? How do you evaluate a LlamaIndex RAG pipeline for faithfulness? Explain the execution flow of a query in a VectorStoreIndex-based query engine? Explain the internal working of the IngestionPipeline caching mechanism? Explain the lifecycle of a Node from Document to retrieval? What is the difference between PropertyGraphIndex and KnowledgeGraphIndex? How can you optimize token usage and cost in a large-scale LlamaIndex deployment? Explain the internal working of AgentWorkflow and event-driven workflows in LlamaIndex? How do you troubleshoot poor retrieval relevance in a LlamaIndex application? What happens internally when you call index.as_query_engine()? How does LlamaIndex handle asynchronous querying at scale? Explain the difference between the low-level composition API and the high-level API in LlamaIndex? Why doesn't increasing similarity_top_k always improve answer quality? How do you design a hybrid search system combining vector and keyword retrieval in LlamaIndex? Explain the internal working of tree_summarize response synthesis? How would you architect a multi-tenant LlamaIndex application with metadata filtering per tenant? Which is better and why: sentence-window retrieval vs auto-merging retrieval for long documents?
Show more question and Answers...


Comments & Discussions