NaturalLanguage
|
send a query directly to a large language model
|
|
Calling Sequence
|
|
RawQuery()
RawQuery(, )
|
|
Parameters
|
|
|
-
|
string, query to send to a large language model.
|
|
-
|
(optional) option of the form , where is , , , or .
|
|
|
|
|
Description
|
|
•
|
The RawQuery command sends the string query to one of several models from OpenAI, through a Maplesoft server; and returns the response as a string. Most other commands in the NaturalLanguage package are routed through RawQuery, with some pre- and/or post-processing.
|
•
|
Maple can interface with OpenAI's GPT-4o, o1-mini, and o3-mini models. You can select these by using the options ; ; and , respectively. By default, or when explicitly selected with the option, a Maplesoft server chooses an appropriate model. (At the time of release of Maple 2025, this was the o3-mini model.) Note that OpenAI may deprecate and disable models, so the set of models supported may change in the future.
|
|
Note: Large language models often generate inaccurate statements. Please keep this in mind: this is not technology for building a bridge with.
|
|
|
Examples
|
|
>
|
|
>
|
|
| (1) |
>
|
|
| (2) |
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
| (5) |
>
|
|
| (6) |
|
|
References
|
|
|
|
Compatibility
|
|
•
|
The NaturalLanguage:-RawQuery command was introduced in Maple 2024.
|
•
|
The NaturalLanguage:-RawQuery command was updated in Maple 2025.
|
|
|