Generate AI Tools for Excel
Generate AI Tools for Excel is an add-in to utilize OpenAI's ChatGPT, Google's Gemini, and Anthropic's Claude from Microsoft Excel.
Generative AI Tools for Excel allows you to link Excel with ChatGPT/Gemini/Claude and express requests and responses to ChatGPT as expressions. It also provides contextualized responses, which was difficult to do without going through the API, and dedicated functions for classifying text without training data.
To use this add-in, please contact OpenAI, Google AI Studio or [Anthropic](https ://console.anthropic.com/settings/keys) API key is required to use this add-in.
Functions linked to the generated AI
The following functions are available
- BB.ASK() function Sends a question-and-answer type instruction to the AI and makes it answer.
- BB.CHAT() function Sends a series of conversation to AI and let it answer the rest.
- BB.CATEGORIZE() function sends text and classification candidates to the AI, and makes the AI answer which one corresponds to which one
- BB.LOOKAT() function causes AI to read an image link and answer about its content
How to use BB.ASK() function
This is the most basic function. By devising the prompt, you can perform various processing.
It is of the form BB.ASK(\<prompt\>, [temperature generated], [max tokens], [model])
.
=BB.ASK("What prefectures face mountains such as Hakone and Daisen, and Sagami Bay?")
Usage of BB.CHAT() function
This function is used to do things in Excel that could previously only be done via the API, such as separating role settings and prompts.
It is of the form BB.CHAT(<role column>, <content column>, [temperature generated], [max tokens], [model])
.
The role is the role to be set in the message object of ChatGPT API, and the content is the content as well.
role | content value* |
---|---|
system | describes the AI assistant's settings. |
user | This is the user's input text |
assistant | Output text from the AI. |
The API describes data in JSON format as an Excel table,
=CHAT(A2:A5,B2:B5)
By defining the AI's "personality" in system, and the content of the conversation in user and assistant, the answer will be based on the context of which prefecture "that prefecture" is talking about.
How to use the BB.CATEGORIZE() function
This function is used to classify text without prompting. It uses function calling internally (function calling) and is less likely to produce unexpected responses.
The format is BB.CATEGORIZE(<content>, <classification>, [temperature generated], [model])
.
=BB.CATEGORIZE("This prefecture faces mountains such as Hakone and Daisen, and Sagami Bay.",{"Tokyo", "Kanagawa", "Shizuoka"})
The classification can be specified as a range, or directly within {}.
Usage of BB.LOOKAT() function
This function allows AI to read an image link and answer about the content.
It is of the form BB.LOOKAT(<prompt>, <image link>, [temperature generated], [max tokens], [model])
.
= BB.LOOKAT("Are there flames or smoke in this image?" , "https://images.example.com/cctv.jpg")
How to use the BB.MAJORITY() function
This function classifies text using one or more AI models and determines the response by majority vote. The model list argument specifies the AIs to be voted on, the classification list specifies the classification, and the majority voting method is specified by the majority voting method argument.
The format is BB.MAJORITY(<model list>, <text>, <classification list>, [temperature generated], [model])
.
=BB.CATEGORIZE(A1:B3, "Tokyo", {"Tohoku", "Kanto", "Chubu"})
fine tuning
The Generate AI Tool for Excel allows you to customize and tune your AI's existing training data to answer based on your own knowledge. As shown below, define the role of the respondent in system, prepare between 10 and 100 sets of questions and answers as user and assistant content, and press the "Submit" button in the work pane to upload the training files to OpenAI's server.
Please read OpenAI's explanation carefully before executing fine tuning. Before uploading the production training data, it is recommended to check with a small amount of data to see if you can answer appropriately based on your own knowledge, or if the accuracy improves with a few dozen data, by using the example question/answer pairs with the BB.CHAT function.