Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate a list of related topics from a starting topic
ResourceFunction["GenerateRelatedTopics"][topic] generates a single idea related to topic. | |
ResourceFunction["GenerateRelatedTopics"][topic,n] generate a list of n ideas related to topic. | |
ResourceFunction["GenerateRelatedTopics"][{topic1,topic2,…},n] generates n ideas related to the list {topic1,topic2,…}. | |
ResourceFunction["GenerateRelatedTopics"][topic,Automatic] generates an LLM-determined number of ideas related to topic. | |
ResourceFunction["GenerateRelatedTopics"][{topic1,topic2,…},Automatic] generates an LLM-determined number of related ideas to {topic1,topic2,…}. |
"TopicFormat" | "A few keywords " | qualitatively specifies the text format of related topics |
"TopicKind" | "Relevant ideas" | qualitatively specifies the type of related topics |
Generate a single idea related to a topic:
In[1]:= | ![]() |
Out[1]= | ![]() |
Generate three ideas related to a topic:
In[2]:= | ![]() |
Out[2]= | ![]() |
Generate three related ideas from a list of topics:
In[3]:= | ![]() |
Out[3]= | ![]() |
Let the LLM choose how many related ideas to list:
In[4]:= | ![]() |
Out[4]= | ![]() |
Specify the format for LLM-generated ideas:
In[5]:= | ![]() |
Out[5]= | ![]() |
Since the format is specified qualitatively, it is quite flexible and open-ended:
In[6]:= | ![]() |
Out[6]= | ![]() |
Provide additional detail specifying the nature or related ideas to generate:
In[7]:= | ![]() |
Out[7]= | ![]() |
Since the format is specified qualitatively, it is quite flexible and open-ended:
In[8]:= | ![]() |
Out[8]= | ![]() |
Generate research topic ideas:
In[9]:= | ![]() |
Out[9]= | ![]() |
Generate interdisciplinary research topic ideas:
In[10]:= | ![]() |
Out[10]= | ![]() |
Generate fictional story elements based on a theme:
In[11]:= | ![]() |
Out[11]= | ![]() |
Generate "hot takes":
In[12]:= | ![]() |
Out[12]= | ![]() |
Generate creative themes for a party or event:
In[13]:= | ![]() |
Out[13]= | ![]() |
Generate creative pet names:
In[14]:= | ![]() |
Out[14]= | ![]() |
List famous quotes related to a topic (you'll want to check that these are real):
In[15]:= | ![]() |
Out[15]= | ![]() |
GenerateRelatedTopics defines and calls an LLMFunction to generate its output. Since LLMFunction defaults to using 0 as the temperature setting in the LLMEvaluator, GenerateRelatedTopics will consistently return the same output for a given input by default. To make GenerateRelatedTopics nondeterministic, you can set the temperature with the LLMEvaluator option like so:
In[16]:= | ![]() |
Out[16]= | ![]() |
In[17]:= | ![]() |
Out[17]= | ![]() |
Different LLM services have varying rate limits on API calls. If the number of related topics requested exceeds the allowed rate limit for your specific LLM service or model, the function might not be able to generate all the requested topics in a single function call. This may result in incomplete output and error messages.
To mitigate this, consider adjusting the number of topics requested, using an LLM service with higher rate limits, or using multiple delayed function calls:
In[18]:= | ![]() |
Out[18]= | ![]() |
In[19]:= | ![]() |
Out[19]= | ![]() |
Use an LLM to generate a graph of related ideas (this may take a while to evaluate):
In[20]:= | ![]() |
Out[20]= | ![]() |
Wolfram Language 14.0 (January 2024) or above
This work is licensed under a Creative Commons Attribution 4.0 International License