Most AI code assistants struggle with large, complex codebases because they lack reliable project-wide context, leading to shallow or incorrect suggestions. This talk presents a technical approach to improving AI code generation by combining NVIDIA NeMo Retriever NIM with the Model Context Protocol (MCP). We show how long-context embedding models from NeMo Retriever, paired with AST-based chunking that preserves logical code boundaries, enable higher-quality retrieval across massive C++ projects. By exposing this retriever as an MCP server, AI assistants can dynamically pull in relevant project-specific context, such as engine APIs, architectural patterns, and recent changes, at generation time. The result is more accurate, context-aware AI code generation that aligns with a project’s structure and conventions.
- Get started with NVIDIA tools and resources for game developers: https://developer.nvidia.com/industries/game-development