Created
November 19, 2023 23:00
-
-
Save taf2/f4cea2771ab7310b9a82448ebedde6bb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub_topics = [ ... ] # say you give it like 800 topics. | |
prompt = | |
Here is a set of JSON encoded topics: #{sub_topics.to_json}. | |
Please generalize these into a smaller set of no more then 10 topics. | |
Your new generalized topics may be expressed as multiple words. | |
Output as a JSON object of the new topics and the sub topics that belong to each topic. | |
e.g. given ['sub topic 1', 'sub topic 2', 'sub topic 3', ...] group them into parent topics like {'topic1': ['sub topic 1', 'sub topic | |
outputing as JSON | |
system = You are an expert at generalizing topics. You review lists of topics and group them into similar topics. | |
Output as a JSON object of the new topics and the sub topics that belong to each topic.\n e.g. given ['sub topic 1', 'sub topic 2', 'sub topic 3', ...] group them into parent topics like {'topic1': ['sub topic 1', 'sub topic 2'], 'topic2': ['sub topic 3', ...]}\n outputing as JSON |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
generates a broken response and seems to be looping the output like : ```",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "finishing touches",\n "
},
"finish_reason": "length"
}
],
"usage": {
"prompt_tokens": 4756,
"completion_tokens": 4096,
"total_tokens": 8852
},
"system_fingerprint": "fp_a24b4d720c"
}````
vs gpt-4 was not having repeated sub topics.