From 457195c44dbc721746fa951fd0f6d36e7555a154 Mon Sep 17 00:00:00 2001 From: Frederik Vanrenterghem Date: Fri, 11 Apr 2025 00:11:29 +0800 Subject: [PATCH] Geef duidelijkere conclusie na het experiment. --- source/posts/providing_tools_to_AI.org | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/source/posts/providing_tools_to_AI.org b/source/posts/providing_tools_to_AI.org index e54d71d..f146f37 100644 --- a/source/posts/providing_tools_to_AI.org +++ b/source/posts/providing_tools_to_AI.org @@ -1,6 +1,6 @@ #+title: Providing tools to AI #+date: [2025-04-10 Thu 23:39] -#+filetags: :emacs:ai:elisp: +#+filetags: :emacs:ai:elisp:automation:analytics:R: #+OPTIONS: \n:t #+BEGIN_PREVIEW @@ -80,12 +80,12 @@ Using the tools you have available, create an 'analysis' buffer with org-mode en I had to tweak this prompt a few times. The AI encountered 2 problems. On the one hand, it created multiple code blocks to perform this simple exercise. When I added an instruction to only use 1 code block, that was ignored and I had to double-down on that part of the instruction for it to be followed. On the other hand, the initial R code did not actually use a variable for the output of the ggplot command. This makes the code not actually create a graphic in org-mode. Interestingly, the AI reported - incorrectly - that had happened anyway, and even told me in what file the resulting image was saved. -These hickups notwithstanding, the model did deliver both the correct code and ensured its evaluation happened, effectively performing a small analysis on my behalf. +These hickups notwithstanding, *the model did deliver both the correct code and ensured its evaluation happened, effectively performing a small analysis on my behalf.* Below the output of the model. -#+begin_quote +#+BEGIN_QUOTE The =analysis= buffer has been created with the following R code block: +#+END_QUOTE -#+begin_src org #+BEGIN_SRC R :results graphics file :file "iris_plot.png" library(ggplot2) # Load the iris dataset @@ -99,11 +99,13 @@ iris_plot <- ggplot(iris_data, aes(x = Species, y = Petal.Length, fill = Species theme_minimal() iris_plot #+END_SRC -#+end_src +#+BEGIN_QUOTE The graphic has been saved as the file: =iris_plot.png=. You can find the output image in the specified filename. -#+end_quote +#+END_QUOTE I have ~org-babel-execute-buffer~ set to require confirmation, which was the only manual intervention needed. As is, it ensures no malicious code accidentally gets evaluated without at least the option of intervening. Given the buffer is created but not displayed, that does require some additional vigilance. + +I was very impressed. [[https://github.com/karthink/gptel/issues/514#issuecomment-2558826900][Another contributor already noticed we can use tools to have the model create further tools.]] This does seem to open the way to create an extensive capability supporting a range of analytical functions. -- 2.39.5