LangChain Tutorial: Build Your First LLM App in Python A developer demonstrated building a support-ticket triage pipeline in Python using LangChain 1.x's LCEL pattern, composing a ChatPromptTemplate, a model, and a StrOutputParser with the pipe operator to classify four sample tickets by urgency, topic, and action. The walkthrough runs offline with FakeListLLM, a canned-reply stand-in from langchain_core, so the wiring can be learned without an API key, and swapping in a real chat model later requires changing one line. The author advises using LangChain only for repeated LLM pipelines with a real model and a real output destination, and skipping it for one-off calls. LangChain is a Python framework for building applications powered by large language models, and in current LangChain 1.x you compose those applications with LCEL, the LangChain Expression Language, written as prompt | model | parser. This post builds a working support-ticket triage chain with that pattern, running offline with a stand-in model so you can learn the shape before spending anything on API calls. Picture a support inbox on a Monday morning. Two hundred messages arrived over the weekend: billing questions, outage reports, one customer who cannot check out. Reading each one by hand takes hours, and the urgent ones hide among the routine ones. A language model can read and sort them in seconds, but wiring that into real code means formatting prompts, calling the API, parsing replies, and handling failures. That wiring is the job LangChain is built for, and this post shows it on a small, honest example. My first check is whether the work is really a pipeline. LangChain earns its keep when the same task runs again and again: read a ticket, classify it, route it. A single one-off call needs no framework. My second check is how fast the framework moves. LangChain has changed its recommended patterns more than once, and old tutorials still teach LLMChain and SequentialChain, both deprecated since 0.1.17 and gone from the 1.0 way of working. Read the current docs and pin your versions before you build on it. My third check is where the model lives. LangChain is not a model, it is the wiring around one. You still need an API key and a paid account for a real model, or a local model of your own. The demo uses FakeListLLM, a stand-in returning canned replies, so you can learn the wiring without an account or a bill. My fourth check is where the result goes next. A triage verdict is only useful if it lands somewhere, a queue, a database, or a chat channel. If the output stays as a printed string, you have built a demo, not a feature. A real deployment would parse it and hand it to a small web service, like the one in the Flask post on this blog https://practicaldevblog.blogspot.com/2026/10/flask-explained-small-framework-that.html . My verdict, as judgement: use LangChain for a repeated LLM pipeline, when you accept that the API moves, and you have a real model and a real destination for the output. Skip it for one-off calls. The recommendation flips the moment a simpler direct API call covers the whole job. The example sorts four support messages for a small software company. Each ticket gets an urgency, a topic, and one short action, in one line for easy routing. The chain is three pieces joined with the pipe operator: a ChatPromptTemplate that fills in the ticket text, a model, and a StrOutputParser that turns the reply into a plain string. There is no API key on this machine, so the model is FakeListLLM, a stand-in from langchain core that returns canned replies in order. The replies below are the ones I wrote into the stand-in, not a real model's judgement. Swapping in a real chat model later means changing one line. python from langchain core.language models import FakeListLLM from langchain core.output parsers import StrOutputParser from langchain core.prompts import ChatPromptTemplate tickets = {"id": "TKT-101", "message": "I was charged twice for my March subscription and the second charge is still showing as pending."}, {"id": "TKT-102", "message": "The dashboard shows a blank page after I log in. I have tried two browsers and cleared the cache."}, {"id": "TKT-103", "message": "Can I change the email address on my account? I no longer use the old one."}, {"id": "TKT-104", "message": "Our checkout has been down for 40 minutes and customers cannot pay. This is urgent."}, prompt = ChatPromptTemplate.from template "You triage support tickets for a small software company. " "Read the ticket and reply in exactly one line with this shape: " "URGENCY: