Who it's for
Platform
Resources
subtopic
Build the corrective loop as a LangGraph graph: retrieve → grade each chunk (relevant yes/no, a small LLM prompt) → if too few relevant chunks, rewrite the query and search again (max 2 retries) → generate. This fixes many 'found the wrong pages' failures.
Builds on: 4.7 Improve