postor / chatpdf-minimal-demo

a minimal viable project of chatpdf
MIT License
600 stars 108 forks source link

how to generate question automatically? #3

Closed hktxt closed 1 year ago

hktxt commented 1 year ago

we can split articles into pieces and then convert them to embeddings using openAI. However, how can we generate questions automatically? we only have articles, we don't have questions. manually write?

postor commented 1 year ago

That just need a little more logic, you can give ChatGPT some part of the content as context and ask him for questions. For more resonable questions, you will need to sample more content like a chapter or two and group them with clustering, then sample from each group to ask ChatGPT for questions

postor commented 1 year ago

@hktxt added example code to generate question now