Won Best in Education at HackMIT 2022

Students with mentors perform 2-sigma above the mean. In a field expanding as rapidly as programming, however, it is infeasible for every learner to get one-on-one human instruction. GreyDuck is a tool to suggest and explain revisions to code. It leverages LLMs such as GPT-3 and Codex to identify aspects that are slow or inelegant.

An ensemble model not only rewrites problematic segments but justifies the changes to facilitate learning, providing insight that would have required human assistance. Our frontend is a VSCode extension connected to a platform-agnostic REST microservice. The second that the user stops typing, our extension analyzes their code and provides suggestions. Try it out at greyduck.guide!

We have a generate-then-motivate pipeline where we ingest the code as an abstract syntax tree (AST); compute risk measures (loop depth, scope analysis, etc.); parallelize suggests across Codex (specific) and GPT-3 (broad); diff the new ASTs and justify significant changes.

Built With

Share this project: