Inspiration

Documentations are hard. Companies need the help from senior engineers to onboard new employees about exisitng codebases, which makes the process costly and unproductive. 3LM takes away the stress of going through this tedious power using the power of Large Language Models (LLM) to automatically generate documentations for codebases. This will save countless manhour and money and allow the company to devote the saved resources on more important engineering issues.

Solution

A webapp with an easy-to-use interface that can take in the URL of a github repo and generate a wiki in the format of a markdown file. This file documents the repository's structure and explains how different files work and interact with each other and any external libraries.

Implementation

The implementation is divided into two phases. The first phase is fetching the data from the repository of interest. We use LlamaIndex API to Fetch, parse, and store Github repo information into a local file. Using the same API, we then generate description of each individual repo files and aggregate individual descriptions into a large, unprocessed raw string.

The second phase uses GPT-4 API to process and structure this raw string We implemented a function that takes in a string, polishes the string, and integrate it with markdown syntax.

The markdown file will be the final output of this program. Voila, you've just created a professionally written documentation for your own repository.

Challenges we ran into

For large repositories with more than 20,000 lines for code, 3LM encounteres performance issue. We expect this issue to be resolved with divide and conquer instead of feeding a monolithic codefile to our LLM.

Accomplishments that we're proud of

  • Made use of the state-of-the-art LLM models in the industry.
  • Consistently output accurated, professional grade documentation to small to medium sized repositories.

What's next for 3LM

  • Create a GUI and server side
  • Add support for github pages
  • Add support for local repositories or non github repositories
  • Use Llama’s query system to create a more organized wiki structure (with linked nodes/md files in a tree structure)
  • Fine-tune prompt engineering techniques
  • Fine-tune wiki creation (maybe add documentation for functions, or other specific features)

Built With

Share this project:

Updates