179 questions
No questions match those filters.
What is Reflection in Agentic RAG and how is it impleme...
This is one of the questions in the full AI/ML interview bank. Pro unlocks all 1789 questions; Premium includes the same bank plus the highest daily Practice limit.
See plansReflection is a critique-and-revise loop where the model doesn’t just generate an answer once and return it — it generates, then a second LLM call reviews that draft specifically for missing information, factual errors, and clarity problems, and a third step revises the draft based on that critique. This repeats until either a quality score clears a threshold or a maximum number of iterations is reached.
In LangGraph, this maps naturally onto a graph with a cycle: a generate node feeds into a reflect node, and a conditional edge out of reflect either routes to revise (which loops back to reflect again) or exits to END once the quality score is high enough or the iteration cap is hit. The cost of this pattern is real — each pass through the loop is an additional LLM call — so it’s best reserved for outputs where getting it wrong is genuinely expensive, like medical, legal, or financial content, rather than applied uniformly to something like a routine support chatbot.