feat: grounding in documentation

Resolved 💬 3 comments Opened Apr 17, 2025 by kendonB Closed Aug 7, 2025
💡 Likely answer: A maintainer (tomascupr, contributor) responded on this thread — see the highlighted reply below.

This would be a tool that searches specifically for relevant documentation when unsure about syntax or arguments.

The models have fairly good knowledge of these but still make mistakes especially for niche packages/languages.

The logic to do this should be similar to what a human would do (a last resort): try using what you remember first, observe errors, fix using what you remember, observe persistent errors, check online, damn still not working, check docs, record the lesson in the memory.

View original on GitHub ↗

3 Comments

tomascupr contributor · 1 year ago
tamlyn · 1 year ago

Further to the discussion in #277 (now closed and locked), here are some findings from Simon Willison doing exactly exactly this:

On a whim, I pasted my full HTML code (with inline JavaScript) into ChatGPT o4-mini-high and prompted: `` This code needs to be upgraded to the new recommended JavaScript library from Google. Figure out what that is and then look up enough documentation to port this code to it. `` (I couldn’t even be bothered to look up the name of the new library myself!) ... it did exactly that. It churned away thinking for 21 seconds, ran a bunch of searches, figured out the new library (which existed way outside of its training cut-off date), found the upgrade instructions and produced a new version of my code that worked perfectly.
codex-maintainers · 1 year ago

Thanks for the feedback! Please try the latest version of Codex CLI, as we're actively working on improvements. If the issue persists, feel free to report it again.