Skip to content
Forward Deployed

Forward Deployed
Lessons and contents
Framework Fluency: LlamaIndexLesson 1 of 6
6 lessons
Learn

Framework Fluency: LlamaIndex: overview

Source
From the RAG & Agents Engineering course
By
Sourav Banerjee
Last updated
8 Nov 2026

Report an issue

T6.6 rebuilds pipelines you already know from the LangChain modules in LlamaIndex: a plain vector RAG, hybrid fusion, reranking and an enrichment window. The ideas are the same; the class names and several defaults change. The T6.6 notebooks build on four ideas: the Node as the unit LlamaIndex indexes, the QueryEngine that wraps retrieval and answering, the postprocessors that edit the retrieved list in between, and the sentence window that retrieves one sentence and sends its neighbours.

The notebooks run on a 33-page climate-change PDF and a 100-row customer CSV. These pages and the lab use the Larkspur Cloud handbook from T5.1 to T5.3, loaded as two Documents: the refunds section from T5.3 and a short exports section. Three golden questions carry the module: Can I get a refund on an annual plan after 45 days?, How long does a refund take to appear? and Can I export my data after I cancel my plan? The first one is the hard case. Its best-matching sentence is the 30-day full-refund rule, and the answer sits in the sentence after it.

In short

  • A LlamaIndex Node is a chunk with an id, metadata and links to its source Document and its neighbours. chunk_size counts tokens, and the metadata string counts against it: on the notebook's PDF the page label and file path take 38 of the 200 tokens.
  • index.as_query_engine() builds a retriever, a list of node postprocessors and a response synthesizer, and returns the answer with its source_nodes. Check the defaults: similarity_top_k is 2, and QueryFusionRetriever makes 4 queries (3 of them written by the LLM) unless you set num_queries=1.
  • Postprocessors run in list order on the retrieved nodes. On the handbook, retrieving 10 sentences and letting the ms-marco-MiniLM-L-6-v2 cross-encoder keep 2 brings in the prorated-refund rule that plain top-2 retrieval misses.
  • A sentence window embeds one sentence and sends up to window_size sentences on each side. In the lab the retrieval scores are identical for every window size; only the text the LLM reads changes, from 142 characters for the bare sentence to 621 at the notebook's window_size=3.
  • The notebooks pass a FAISS store to IngestionPipeline without an embedding step, so FAISS stays empty and VectorStoreIndex(nodes) builds a second, in-memory index. Read what each object actually holds before trusting a port.

Mental model

The LlamaIndex pipeline Ingestion: a reader loads the handbook as 2 Documents, transformations split them into 17 nodes, and the nodes are embedded into a VectorStoreIndex. Query: a question goes to the retriever, which returns the top-k nodes; the node postprocessors rerank or rewrite that list; the response synthesizer writes the answer and returns it with its source nodes. Ingestion: once QueryEngine: every question Reader Documents Transformations Nodes Index 2 Documents 17 nodes similarity Question Retriever Postprocessors Synthesizer Response refund after 45 days? top-k nodes reranked list source_nodes
  1. A reader loads the handbook’s two sections as 2 Documents.
  2. The transformations run in order and turn the Documents into 17 nodes.
  3. Each node is embedded and stored in the VectorStoreIndex.
  4. A customer asks “Can I get a refund on an annual plan after 45 days?”
  5. The retriever returns the similarity_top_k nearest nodes with their scores.
  6. Each node postprocessor edits the list in turn: rerank, filter or swap in a window.
  7. The synthesizer writes the answer and returns it with the source nodes it used.

The diagram is T5.1's lifecycle with LlamaIndex names on the boxes, plus a stage T5.1 does not have. Node postprocessors sit between retrieval and the LLM, and reranking, filtering and window replacement all plug in there. Each one takes a scored list of nodes and returns another.

Interactive lab

Sentence window lab: open the file in a browser. Pick Can I get a refund on an annual plan after 45 days? with window_size at 0: the model gets the 30-day rule and no answer. Move it to 1 and the prorated rule arrives in 284 characters. Then pick the export question, where the window stops growing at 2 because the exports Document has only four sentences, and set similarity_top_k to 2 on the refund-timing question to see neighbouring windows send the same sentences twice.

How it connects

  • Before: T5.1 is the lifecycle this module renames. T5.3 wrote the refunds section and the small-chunk trade-off the sentence window answers. T6.1 covers score fusion and rank fusion in LangChain, and T6.3 covers cross-encoder and LLM reranking and character-based enrichment windows.
  • Next: T7.1 starts T9, where the retriever becomes one tool an agent can call; T9.4 wraps a RAG pipeline as that tool.

Key Takeaways

  • Map the concepts first: Document and Node, retriever, postprocessor, QueryEngine. Then read the defaults, because they differ from LangChain's.
  • Check what each component holds after the pipeline runs: vectors in the store, metadata in the embedding text, and the score direction of every retriever.
  • Put reranking, filtering and window replacement in node_postprocessors, in the order you want them applied.
  • Retrieve small, send big: a sentence window keeps the retrieval scores of a sentence and gives the model the paragraph around it. Size the window per question type and watch overlap when k is above 1.

Rate your confidence and keep notes on the module page.