Large Language Models (LLMs) are increasingly used for automated code review and migration assistance, yet they frequently hallucinate API names, fabricate deprecated method signatures, and recommend patterns from incorrect library versions. We present DocAware, an open-source tool that augments LLM-based code review with structured, version-specific API documentation retrieval and a persistent memory layer. Through a controlled ablation study across five popular JavaScript libraries (OpenAI, Express, Stripe, Mongoose, Axios), we evaluate four experimental conditions: (A) baseline LLM with no documentation, (B) LLM with raw documentation (naive RAG), (C) LLM with structured documentation retrieval, and (D) the full DocAware pipeline with structured docs and agent memory. Our results across 9 experiments show that documentation augmentation improves F1 score by 22.4% (from 70.9% to 86.8%), with recall increasing from 76.4% to 98.6%. Structured retrieval outperforms naive RAG by 1.7 F1 percentage points while using fewer tokens. These findings demonstrate that grounding LLM agents in version-specific documentation significantly reduces hallucinations and improves the reliability of AI-assisted code review and migration tools.
Pallavi Lakshmi Chandrashekar (Mon,) studied this question.