GenerateDocument[interactive] - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : NaturalLanguage : GenerateDocument[interactive]

NaturalLanguage[GenerateDocument]

  

interactive

  

interactively generate a document using a large language model [Technology Preview]

 

Calling Sequence

Description

Examples

References

Compatibility

Calling Sequence

GenerateDocument[interactive]()

Description

• 

This command is a technology preview that displays an interactive application to interact with the facilities provided by the NaturalLanguage:-GenerateDocument command. The application is implemented in embedded components within the Standard GUI.

• 

The application shows various text fields and other interactive components that the user can interact with:

– 

There is a text area labelled Prompt:. In order to start a conversation, enter a new prompt here. In order to converse with the large language model (LLM), enter a response.

– 

Next are a combo box and a text area labelled Number of paragraphs:. You can adjust the number of paragraphs here. If you enter text into the text area, that takes priority over the combo box. If you modify the combo box, that erases the text area. The options in the combo box are the numbers 1 to 7.

– 

Then come a combo box and a text area labelled AI assumes the role:. You can adjust the role that the AI assumes here. If you enter text into the text area, that takes priority over the combo box. If you modify the combo box, that erases the text area. The options in the combo box are Scientist, Teacher, and Engineer.

– 

Then you see a button initially labelled Start conversation, which changes to Continue conversation after the first interaction with the LLM. Pressing this button will send a query to the LLM and interpret the result.

– 

The final element of the initial layout of the application is a button labelled Clear conversation. Pressing this button resets the application to its initial state.

  

After the first interaction, two new items are shown below these two buttons.

– 

The first is an overview of the history of the conversation. This is a table with one row for each message sent or received in the interaction with the LLM.

  

Each row contains up to three items. The main item is the text of the message that this row represents, possibly cut off to fit on one line, preceded by the "author" of the message. The options for the author are:

• 

"system", meaning this is a system message generated by Maple, either to start the conversation or as a result of a change in the settings;

• 

"user", meaning this is a message written by you;

• 

or "assistant", meaning this is a message generated by the LLM.

  

The other two entries in the row occur only for "assistant" messages. They are a radio button on the left and a button labelled "Open as new document" on the right. The button on the right opens the document generated in this "assistant" message as a new document. The radio button on the left selects this message as the "current" message. It displays the document generated in this "assistant" message under the history table. Moreover, whenever the "Continue conversation" button is pressed, any history that came after this message is discarded, and the conversation continues from that point onwards.

– 

The final item below the history table is an inline display of the generated document. It is updated whenever a new document is generated by the LLM, and when a radio button selection changes the "current" message.

  

Note: Large language models often generate inaccurate statements. Please keep this in mind: this is not technology for building a bridge with.

Examples

withNaturalLanguage:

GenerateDocumentinteractive

References

  

The OpenAI website.

Compatibility

• 

The NaturalLanguage:-GenerateDocument/interactive command was introduced in Maple 2025.

• 

For more information on Maple 2025 changes, see Updates in Maple 2025.

See Also

NaturalLanguage:-GenerateDocument