Message Boards Message Boards

Are LLM Tools and LLM Configuration Options Working in Prompt Resource Definition Notebooks?

I would like to create a new LLM prompt using a prompt resource definition notebook. The idea is to set it up such that the AI "assistant" is told to be an AI Tutor and is given some teaching tools. These tools would be implemented as functions - LLM Tools in wolfram terminology. These would allow the AI tutor to augment the LLM's text-only experience with all the rich visualizations that Wolfram Language can do, as well as reduce hallucinations by feeding in data.

I couldn't get LLM Tools and LLM Configuration Optionsworking so far... I got the feeling from watching WolframU videos etc. that this is a half-baked feature that Wolfram R&D is still actively working on. What's going on, can someone please provide an update, ETA? The whole chat-notebook experience in 13.3 is on one hand wonderful on the other hand not robust, menu items sometimes appear sometimes disappear.

enter image description here

POSTED BY: Tamas Simon
8 Replies

wow, chat notebooks work nicely. So far I couldn't add my own persona (prompt resource) to the list.

POSTED BY: Tamas Simon

LLMTools will be great for learningenter image description here

See here published to the web. Next question is... will this all work in the browser?

POSTED BY: Tamas Simon

If I define an LLM Tool... how can I output something and make it appear underneath the chat output cell? I've tried CellPrint but its output goes to the Messages view instead of the current notebook. What's the trick? It would be very useful to define tools that could use the full wolfram functionality for output so in addition to the text generated by the LLM we would have interactive maps, graphs, diagrams etc.

POSTED BY: Tamas Simon

thanks, it's starting to work now. We could specify GPT4 in LLM configuration, no?

POSTED BY: Tamas Simon

The speech bubble is the same mechanism you see in a chat-driven or chat-enabled notebook after hitting ' to open a new ChatInput cell. If you're in a notebook that is not a Chat Notebook, from that toolbar speech bubble you can hit the Enable AI Chat Features checkbox to turn it into one. If your paclet is out of date, it will prompt you to install the latest version like the image below. You may have to restart the front end / application after an update.

You shouldn't need to create any initialization cells for a prompt or LLMTool using that definition notebook

enter image description here

POSTED BY: Avery Davis

First problem: the top right speech bubble icon re-appeared, the chat driven and chat enabled notebook options disappeared from the File menu screenshot1

If I select "Install from URL" using the top-right dropdown menu then I get an error: screenshot<em>oferror

Do I need to reinstall the paclet?

Also, in your example does the line...

tool=LLMTool["cityPopulationFinder","city"->"City",#city["Population"]&]

...need to be set as initialization cell?

thanks!

POSTED BY: Tamas Simon

your example is exactly what I'm looking for. I'm going to try it right away. Thanks.

POSTED BY: Tamas Simon

Yes it's still being worked on. Here's an example that uses the LLMTool documentation example of population finding. You can add it as a persona to chat notebooks by deploying to the cloud and adding it from the add/manage persona menu by selecting to use a URL.

Edit: I should add that with chat notebooks tool calling only works with gpt-4 right now, gpt-3.5-turbo makes mistakes. (We have looked into the function calling model but have come across hallucinations it makes thinking it has access to python functions it can call that don't exist.) You can use them programmatically with LLMSynthesize, etc. by setting your LLMEvaluator to have access to tools.

To do the same with the nb I provided it'd be

LLMSynthesize["What is the population of Champaign,IL?", "FullText", 
 LLMEvaluator -> <|
   "Tools" -> 
    LLMTool["cityPopulationFinder", 
     "city" -> "City", #city["Population"] &]|>]

Example in a chat notebook enter image description here

POSTED BY: Avery Davis
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract