IntermediateAbout 15 min

    LangChain

    Read the full article on Substack

    8 min read.

    Run a prompt→model→parser→tool chain, learn the LCEL pipe and the Runnable interface (invoke/stream/batch), tour the component toolbox, and see why loops push you to LangGraph.

    Think of it this way: A chain is a factory line: the prompt station preps the part, the model machines it, the parser inspects and boxes it, the tool ships it. Memory is the clipboard that remembers the last order.

    PromptTemplate
    waiting
    LLM
    waiting
    OutputParser
    waiting
    Tool: speak()
    waiting

    Input: { text: "Good morning" }. Run the chain to pass it through four links.

    Check your understanding

    Answer from memory before you scroll back up. Pulling an idea out of your head is what makes it stay there.

    Build an LCEL chain

    Sequence

    Order the pieces of a retrieval chain.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    1. 1Drop a step here
    2. 2Drop a step here
    3. 3Drop a step here
    4. 4Drop a step here
    4 pieces left to place

    Quiz

    20 questions
    Question 1 of 20
    Score: 0

    What does a LangChain chain compose?

    Done with this lesson?

    Sign in free to keep your progress, streak and quiz scores.

    Keep going