Tag: AI

  • Using ChatGPT for Writing

    I have been experimenting more and more with ChatGPT on a regular basis. I’m interested and curious how this will help. I had a friend at one of the large FANG companies note that they found ChatGPT to be very helpful in their job, with assistance in various things. Their quote:

    ”…I used it to collaborate, having a design discussion, writing requirements, comments and document my code (!!), improve my writing and find the gap and provide suggestions…”

    I thought that was interesting, so I sent in this prompt: write a one page post in the style of http://www.voiceofthedba.com that summarizes this article https://www.madeiradata.com/post/home-experiments-and-stacked-bar-graphs

    I often find links that catch my eye, read them, and save them in a note for a future editorial. This time I asked ChatGPT.

    This is part of a series of experiments with the ChatGPT and other AI systems.

    The Results

    What I got from ChatGPT is below. I read it and then wrote my own editorial, which was called The Best Graph. Mine is quite different, and I think, it’s better. I’m not sure the response below summarizes the post correctly, I don’t know it’s in my style (maybe parts), and ultimately, it’s a summary, not a commentary. Maybe that’s on me. I didn’t specify an editorial or opinion.

    Read them both and let me know which one you like more, which you think works better.

    The ChatGPT Response

    In a recent blog post on Madeira Data Solutions, author Lisa B. shares her findings on the use of stacked bar graphs in visualizing data from home experiments. While stacked bar graphs are commonly used in business and marketing contexts, Lisa explores their potential usefulness in a personal setting.

    Lisa begins by describing her home experiments, which involve testing the efficacy of various cleaning products. She notes that while she initially used line graphs to track the results of her tests, she found that stacked bar graphs were more effective in illustrating the relative performance of each product.

    Lisa goes on to provide a detailed explanation of stacked bar graphs and their components, including the use of color-coding and labels to differentiate between different categories and subcategories. She also notes that stacked bar graphs are useful in highlighting changes over time and in comparing data across different groups.

    One of the key takeaways from Lisa’s post is the importance of choosing the right type of graph for a given dataset. While line graphs may be appropriate for tracking changes in a single variable over time, stacked bar graphs may be more useful when comparing multiple variables or subcategories. By selecting the appropriate type of graph, researchers can more effectively communicate their findings and insights to others.

    Overall, Lisa’s post provides a useful overview of stacked bar graphs and their potential applications in a personal, as well as professional, context. Whether you’re conducting home experiments or analyzing business data, it’s important to choose the right type of graph to effectively convey your findings.

  • AI Thoughts on the Build Keynote

    If you haven’t seen the Build 2023 keynote, it’s, well, interesting. At a surface level, it’s focused on AI and delivers some demos that many of us might find to be useful and intriguing. I didn’t attend the event (or watch it live), but I did see it a bit later and I made some notes, pausing the 30-minute talk a few times to think about what I’d seen.

    The opening lightly glosses over some of the AI enhancements to development tools and the environments that can be created quickly in GitHub or Azure. Some of us will like those, and maybe they’ll grow on me, but I tend to prefer a development environment on my own hardware, where I have unlimited compute power at a fixed cost. The first big announcement is then showing Copilot technology, essentially some ChatGPT-like abilities, embedded into Windows 11. The demo shows asking Windows where settings are, with the response including buttons to take actions, like setting dark mode. Minorly useful, though I think Windows search works fine. I can type “env” and get the “edit environment variables” in the results. I still have to click through to change things, but this doesn’t seem like a better use of AI, especially if I need to type “set dark mode” instead of “dark”.

    To be fair, the demo has the user asking for ways to adjust the system to get more work done. The suggestions are for dark mode and a focus timer. I knew about the former, but not the latter. Perhaps being able to ask for general assistance with tasks is useful as there are likely lots of features I know nothing about and wouldn’t even think to look for. There is also the option to drop a document, like a PDF, in the chat and Windows asks if the user wants the system to “explain”, “rewrite”, or “summarize” the document. The user clicks summarize and gets a summary of the document.

    There is also a demo with plugins that developers can write for Bing, such as one that uses a legal package to make a change to a document. While lawyers might be worried about their practices (or paralegals about job prospects), I’m more worried about a fundamental problem that many of us data professionals have seen in the past: garbage in, garbage out.

    In this case, if the AI model isn’t well-trained, can I really trust it to summarize a PDF or change a legal document? How can I tell if it’s wrong, or slightly off? In some sense, this reminds me of a high school report. It might summarize some text at an A level, or a D level. It’s up to me to judge that, and I can’t assume the results are good or bad.

    The important thing to keep in mind, however, is that we aren’t in that place with AI. We can’t just trust the AI. We are in a time when AI is an assistant, where it can help us complete a task or get something done a little quicker. We are still responsible. We still have to verify and do some work, but if the Copilot can automatically launch Jira and navigate to a ticket, or attach a document and create a short message to our team, that saves us time. It saves us tedium. It can make our jobs easier. We are still needed, but we don’t do all the heavy lifting.

    I do worry about some of the opportunities for plugins that developers will write strictly to monetize their efforts. If I want a shopping list, I don’t want it to go to Instacart. I want a list I can use. I realize that doesn’t necessarily make Microsoft or a developer any money, but not all the tasks and advances are about profit. Or at least, I hope they all aren’t. I hope some are here to just make the world better. For a quick view of what that could be, watch the keynote closing video.

    Steve Jones

    Listen to the podcast at Libsyn, Stitcher, Spotify, or iTunes.

  • AI Experiments–Who am I and how am I remembered?

    I saw someone noting that AIs shouldn’t write obituaries. Since I maintain sqlmemorial.org, I wanted to see what would happen for me.

    This is part of a series of experiments with the ChatGPT and other AI systems.

    First, a simple prompt. This was delayed for about 20s while the AI was processing data. I assume it was looking over the sites for my name.

    2023-05-09 09_42_21-

    When it started to write, I thought it did a decent job.

    2023-05-09 09_46_34-Steve Jones SQL summary.

    I then tried for an obituary.

    2023-05-09 09_43_21-Steve Jones SQL summary.

    I very much appreciate the first part of the response. It isn’t good to do this publicly, though for figures, there are people who have to write and update these things so they are prepared. Not that they won’t edit this if someone dies, but often journalists are prepared.

    However, I also appreciate the kind words in the second para. I am not quite sure where/how this data was assembled, but it isn’t a part of any bio I’ve written.

    Not bad, ChatGPT.

  • T-SQL Tuesday #162–Using AI with Data Science

    This month is a timely topic, with Tomaz Kastrun hosting. I was lucky to meet Tomaz before the pandemic, and we had a great time at the SQL Saturday as well as at Lake Bled the next day.

    2023-05-02 09_58_26-Photo - Google Photos

    Tomaz does a lot of data science with R, Python, and a lot of data. He has some great blogs and does a neat advent series every December. This month he asks us about Data Science in the era of ChatGPT, with two prompts:

    • Where and what have you used it [ChatGPT] for?
    • Have you considered responsible usage of Chat GPT?

    I’ll tackle these below. First my experiments with the AI, and second, Ethics.

    This is part of a series of experiments with the ChatGPT and other AI systems.

    Getting a Visualization

    One of Tomaz’ ideas was a visualization. I have some data, so I used this prompt:

    2023-05-02 10_16_40-

    A very poor prompt on my part, but the AI tried. I asked other questions and kept context of the process.

    2023-05-02 10_17_10-Create KW Visualization.

    Not sure why the image didn’t appear, but there was an explanation, so I asked for code.

    2023-05-02 10_17_59-Create KW Visualization.

    I got some code, and decided to restart this experiment. I started a new chat and recorded my efforts. That result  is on YouTube and (hopefully) embedded below.

    It wasn’t perfect, but I could see this being the way software developers end up using ChatGPT.

    Ethics in AI

    There are a lot of things to think about here, but let me focus in on two things. First, is it ethical to get paid for a job if you are asking ChatGPT for help? Second, is it ethical for ChatGPT to synthesize code samples from SQL Server Central, Stack Overflow, etc., that others have written, and give it to you to use in your code.

    The first one is easy. I say yes, since this is what many of us do with colleagues. We ask them for help, they give us code or examples, and we use them in our work that we commit, turn in, etc. We don’t write all code by ourselves, so I see ChatGPT as asking someone else or posting on a forum.

    The second one is tricky. If I see code on SQL Server Central, then I know who wrote it, or who posted it. If I use that, I need to have rights to do so, or give someone credit. For example, I can post this code:

    –============================================================================= — Create and populate a Tally table –============================================================================= –===== Conditionally drop IF OBJECT_ID(‘dbo.Tally’) IS NOT NULL DROP TABLE dbo.Tally –===== Create and populate the Tally table on the fly SELECT TOP 11000 –equates to more than 30 years of dates IDENTITY(INT,1,1) AS N INTO dbo.Tally FROM Master.dbo.SysColumns sc1, Master.dbo.SysColumns sc2 –===== Add a Primary Key to maximize performance ALTER TABLE dbo.Tally ADD CONSTRAINT PK_Tally_N PRIMARY KEY CLUSTERED (N) WITH FILLFACTOR = 100 –===== Let the public use it GRANT SELECT, REFERENCES ON dbo.Tally TO PUBLIC

    
    

    In doing so, I would give credit to Jeff Moden for writing this code. If I used this inside an organization, I should ask Jeff for permission.

    If I get this from ChatGPT, it is providing sources? Potentially the AI read a lot of code and then synthesized something that works the same, but perhaps it’s also copied the most popular code it’s seen in many training sets of data. Hard to know.

    It’s also hard to know what rights we want to give to the AI, it’s programmers, it’s corporate (or personal) owner, etc. How do we deal with rights here? I’m not sure. This is a an area where I don’t even know what I want.

    What do you think?