Newbie - want to use the API to assist in creating human-readable index for HTML or PDF files

I tried to chat-gpt about this, but didn’t get too far … probably because I didn’t phrase my questions right.

I have an application which stores approx. 100 help topics as HTML files, and I want to create a book-like index to include in the help viewer I have programmed. Basically, it would start with possible index entries of max. three words, two words, and single words. In most other index generating software, words are collected with the page numbers where they appear (e.g. in a multi-page PDF file), and the user has to decide which words to include in the index and can reference other existing entries, or combine different words in the same entry.

I think I can get AI to do helpful things like input a single file along with a list of possible index terms and return a ranked list of the terms sorted as to suitability. The end-user would still be able to override the ranking, but getting a sorted list would make it much easier to accomplish.

At the moment, I am completely in the dark about what model to use; should I use “fine-tune” or “completion”, or something else? Any help would be greatly appreciated.