Black Friday50% off your first month on any monthly plan with EARLY50 See plans
All 29 lessons
  1. Foundations: what RAG is and a working pipeline

    1. 1. Getting started: what RAG is and when to use it
    2. 2. Types of RAG: a map from naive to agentic
    3. 3. Lab: build the smallest RAG pipeline end to end
    4. 4. How embeddings and vector search find meaning
    5. 5. Document types: what each one breaks, and how to prepare it
  2. Better retrieval: chunking and search

    1. 6. Chunking documents so answers survive
    2. 7. Chunking strategies compared: which to use when
    3. 8. Keyword search vs vector search, and fusing both
    4. 9. Retrieval algorithms compared: which to use when
    5. 10. Reranking the top results before the model reads them
    6. 11. Rewriting the question before you search
  3. Answers you can trust, measure and debug

    1. 12. Lab: grounded answers with citations and refusals
    2. 13. Measuring a RAG system with an evaluation set
    3. 14. Lab: evaluation methods and frameworks: Ragas and DeepEval
    4. 15. Troubleshooting a RAG system, symptom by symptom
  4. Production in a company

    1. 16. Access control: only retrieve what the user may see
    2. 17. Defending against prompt injection in retrieved text
    3. 18. Running RAG in production: freshness, cost and monitoring
    4. 19. Real-world RAG: what worked, what failed, and why
  5. Agentic RAG

    1. 20. Lab: from a fixed pipeline to an agent with a search tool
    2. 21. Self-correcting retrieval: grade, retry, fall back
    3. 22. GraphRAG and routing across many sources
    4. 23. Lab: numbers, tables and financial documents
  6. Frameworks: LangChain, LangGraph and LangSmith

    1. 24. The RAG toolbox: what each library does and why you import it
    2. 25. The framework landscape: LangChain, LangGraph, LlamaIndex, Haystack
    3. 26. Lab: Ask Brightline in LangChain
    4. 27. Lab: agentic RAG as a LangGraph graph
    5. 28. Lab: tracing, evaluating and monitoring with LangSmith
    6. 29. Wrap-up: your production agentic RAG checklist
See the leaderboard

12 min

The framework landscape: LangChain, LangGraph, LlamaIndex, Haystack

Map what each RAG framework gives you, what it hides, and when plain Python is the better choice.

By the end of this lesson you can

  • Say what LangChain, LangGraph, LlamaIndex and Haystack each centre on
  • Map this course's plain-Python pipeline to framework components
  • Decide when a framework helps and when plain Python is better

From earlier lessons · 1 of 2

Why does plain RAG fail on "What are the main themes across all incident reports?"

Pick one answer.

From earlier lessons · 2 of 2

Where should "How many VPN tickets did Denver open?" go?

Pick one answer.

Your team lead asks: "Should we rewrite Ask Brightline in LangChain?" A colleague says LlamaIndex is better for RAG. Another says use LangGraph for agents. A third says frameworks hide too much. All four are partly right.

What every framework gives you

Strip away the names, and every RAG framework offers the same building blocks. You wrote each of them by hand in this course.

  • Loaders read PDFs, web pages, SharePoint and databases into documents with metadata.
  • Splitters chunk them, like lessons 6 and 7.
  • Embeddings and vector store adapters give one interface over dozens of providers, like lessons 4 and 9.
  • Retrievers search with k, filters, hybrid and MMR, like lessons 8-10.
  • Prompts and model wrappers cover lesson 12's generation step.
  • Agents and graphs run loops with tools, like lessons 20 and 21.

The value is mostly in the integrations: you swap a vector database or model provider by changing one line. The cost is abstraction: the prompt and the exact calls are hidden one layer down.

Four frameworks, four centres of gravity

  • LangChain is a large library of components and integrations. Since version 1.0 its core is small, and older chains moved to a separate langchain-classic package. Lesson 26 rebuilds Ask Brightline with it.
  • LangGraph is, in its own docs' words, a low-level orchestration framework for long-running, stateful agents. You draw the workflow as a graph of nodes and edges over shared state, with persistence, human review and streaming built in. Its docs note it doesn't require LangChain. Lesson 27 builds the grade-and-retry agent in it.
  • LlamaIndex describes itself as a toolkit for building LLM-powered agents over your data. It centres on data readers, indexes such as VectorStoreIndex, and query engines over them. It's strong when ingestion and indexing are the hard part.
  • Haystack, from deepset, builds pipelines of components: fixed graphs you wire yourself, plus agents when you need flexibility. It suits teams that want explicit, inspectable pipelines.

LangSmith is different: it isn't a framework but a tracing and evaluation service. It works with or without LangChain, and lesson 28 uses it.

[28][29][30][31]

Our plain code, mapped to LangChain and LangGraphchunk_by_heading()embed() + NumPy arrayretrieve() + rerank()Text splitterEmbeddings + vector storeRetrievergrounded_prompt() + llm()agent() loop + grade()Prompt template + chat modelLangGraph nodes and edgeslessons 20-21lesson 27lesson 26

When to use a framework, and when not

Reach for a framework when you need many integrations (five document sources, two vector stores, a model you might swap), or graph features like checkpoints and human approval steps. It also helps when your team already knows it.

Stay with plain Python when the pipeline is small and you need to see every prompt. Anthropic's agent guide makes the same point: frameworks can hide the prompts and responses you need to debug, so start with direct API calls and understand what's underneath.

Mixing is common and fine. You might use LangChain loaders and splitters for ingestion, your own retrieval and prompt code, and LangSmith for tracing.

One warning: these libraries change fast. LangChain 1.0 moved imports and renamed agent functions, and tutorials from 2024 often fail on current versions. Pin your versions, and check the docs' date before copying code.

[10][29]

Match

Match each team situation to a sensible choice

Pick an item on the left, then its match on the right.

Worth keeping

  1. Every framework packages the same stages you built: load, split, embed, retrieve, prompt, loop.
  2. Frameworks pay off through integrations and graph features, and cost you visibility.
  3. LangGraph runs stateful agent graphs and doesn't require LangChain.
  4. Pin versions and check doc dates; these libraries change quickly.

Next lab rebuilds Ask Brightline in LangChain, in about 30 lines. One import from a 2024 tutorial will fail on the first run. You'll see why, and what replaced it.

Leaderboard

Loading…

50 XP for each lesson you finish, 10 for each right answer. Names show only for learners who turn on Show me on leaderboards.

Sources for this lesson (5)

Each fact in the lesson is marked with the number of the page it comes from.

  1. [10]Anthropic (2024), Building effective agents
  2. [28]LangGraph docs: Overview
  3. [29]LangChain docs: Migrating to LangChain v1
  4. [30]LlamaIndex Framework docs
  5. [31]Haystack docs: Introduction