2

I'm currently learning how to use OpenAI API for text summarization for a project. Overall, it's pretty amazing but there is one thing I'm struggling with.

I need a tl/dr summary that is 1 - 2 complete sentences with max of 250 characters. I can play around with the MaximumLength option but if I make it too short, the summary often just ends up with a sentence that is just cut off in the middle.

Another problem is - if there is a bullet list in the main text, the summary will be a few of those bullets. Again, I need 1-2 complete sentences, not bullets.

Lastly, if the main text is quite short, often my summary will be 2 sentences that say the exact same thing with a slight variation.

I've tried this using the various engines (text-davinci, davinci-instruct-beta). Any suggestions on how I can instruct/guide OpenAI to give me the output that I'm looking for? Or, do I need to start doing the "Fine Tuning" option. If I feed it 1,000+ examples of 1-2 sentences with < 250 characters & no bullets, will it understand what I need?

Many thanks in advance.

Mike Smith
  • 618
  • 10
  • 27
  • If you have an OpenAI account, you can use this playground link as an example of what I need to summarize: https://beta.openai.com/playground/p/tsNnCq1eKX5QdjxjYGMOCe5a?model=text-davinci-002 – Mike Smith Apr 29 '22 at 15:26
  • See my answer to [this](https://stackoverflow.com/a/75017790/10347145) question. Set `Max tokens` parameter to 250. – Rok Benko Jan 05 '23 at 11:35

0 Answers0