RAG & Agents Engineering

M06 lab, LangChain core

The parser decides which failures you see.

Eight replies a model could give when asked for a JSON answer with citations, run through four LangChain output parsers. The replies are hand-written and representative; no model was called. The parsers are ports of langchain-core 1.7.0, checked against the library.

Output parser at the end of the chain
Returned without error
Raised OutputParserException
Returned, but unusable
Usable answers

What it adds to the prompt

Show the format instructions

Eight replies, one parser

Question: “How long does a refund take?” Passages: refund-window, refund-timing, billing.

Reply (select to inspect)ResultWhat your code receives

Usable means an answer string and at least one citation that names a real passage. The parsers do not know that rule; the lab grades every result against it.

Inspect one reply

ParserResultDetail
Every cut of this replyRaisedUnusableUsable