context-labs / autodoc

Experimental toolkit for auto-generating codebase documentation using LLMs
MIT License
1.93k stars 113 forks source link

Create a `doc faq` script, that takes in a list of questions and generates an FAQ.md file (after the repo has been indexed) #21

Open andrewhong5297 opened 1 year ago

andrewhong5297 commented 1 year ago

A user has requested to be able to generate an FAQ file given a list of questions easily. This could be implemented as a new CLI command, and the list of questions can be added to the config as an array or something.

"The idea is to process the repo with autodoc, the generated MD files have some auto generated questions about the code, we would love to be able to add questions from our community and get them answered if answer to that question can be generated from the code."

This is a great beginner issue.

dahifi commented 1 year ago

There's a strategy I use with some of the unstructured data where I ask the model 'what questions does this document answer?' and use those to generate FAQs dynamically.

If autodoc would take stdin we could pipe in questions and have it pipe output right back to stdout. gpt-cli does something similar with its -p - flag.

andrewhong5297 commented 1 year ago

There's a strategy I use with some of the unstructured data where I ask the model 'what questions does this document answer?' and use those to generate FAQs dynamically.

If autodoc would take stdin we could pipe in questions and have it pipe output right back to stdout. gpt-cli does something similar with its -p - flag.

Yeah there is a questions generator already for each file! You can find those in the summaries. We don't include an answer to the questions though haha