Tag: AIExperiments

  • AIs Struggle with Family

    This post looks at a logic problem asked to an AI, and which is struggles at finding an answer. This is based on an article noting this question stumps most AIs. The article is at: https://futurism.com/logic-question-stumps-ai

    This is part of a series of experiments with AI systems.

    The Setup

    I loaded a Deepseek model to compare with my Mistral model. I did this with the following commands:

    docker run ollama
    docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
    docker exec -it ollama ollama pull deepseek-r1:1.5b
    docker exec -d ollama ollama run deepseek-r1:1.5b
    docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v ollama-webui:/app/backend/data --name ollama-webui --restart always ghcr.io/ollama-webui/ollama-webui:main

    From there, I had a website.

    The Logic Problem

    In the article, we ask a question.  I asked: >Alice has [5] brothers and she also has [3] sisters. How many sisters does Alice’s brother have?

    The response was interesting, using the Deepseek-r1:1.5b model. Here it is, with the entire response in Italics.

    First, determine the total number of children in the family by adding Alice’s brothers (5) to her sisters (3). This gives a total of 8 children.

    Next, since Alice is one of those 8 children and she has 5 brothers, subtracting Alice from the total gives the number of brothers as 4. However, this calculation leads to a discrepancy because it doesn’t align with the original information provided.

    Recognizing that there might be an error in the initial assumption, consider that Alice has 3 sisters, meaning there are at least 4 girls (including herself). Adding her 5 brothers results in 9 children, which still does not match the given numbers.

    Finally, re-evaluating the problem, it’s clear that without additional context or information, determining the exact number of sisters a brother has is not possible with the provided details.

    Solution:

    Let’s break down the problem step by step.

    1. Total Number of Children in the Family:

      Alice has:

      • 5 brothers

      • 3 sisters

      Since Alice herself is one child, the total number of children is:

      [
      \text{Total children} = \text{Number of brothers} + \text{Number of sisters} + 1 = 5 + 3 + 1 = 9
      ]

    2. Number of Brothers:

      Alice has 5 brothers in her family.

    3. Number of Sisters Alice’s Brother Has:

      Since the total number of children is 9 and there are 5 brothers, we can determine the number of sisters each brother has by subtracting the number of brothers from the total number of children:

      [
      \text{Sisters per brother} = \frac{\text{Total children}}{\text{Number of brothers}} = \frac{9}{5}
      ]

      However, this division does not result in a whole number, which suggests that the problem might be interpreted differently.

    4. Alternative Interpretation:

      Considering that Alice has 3 sisters, it implies there are at least:

      • 1 (Alice) + 3 = 4 girls

      Including her own siblings, if each brother has an equal number of sisters, we can find the exact number by dividing the total number of children among all siblings:

      [
      \text{Sisters per brother} = \frac{\text{Total children}}{\text{Number of brothers} + 1} = \frac{9}{5 + 1} = \frac{9}{6} = 1.5
      ]

      This result still doesn’t make sense in the context of having whole sisters.

    5. Conclusion:

      Given the information provided, it’s not possible to determine an exact number of sisters that each brother has because:

      • The total number of children is fixed at 9.

      • Each brother has a different number of sisters based on their position in the family tree.

      Therefore, with the current details, there isn’t enough information to definitively state how many sisters Alice’s brother has.

    \boxed{\text{Cannot determine}}

    That’s interesting, but is this a Deepseek problem? Let’s try another.

    Mistral

    Mistral is the first model I played with locally. Let’s ask it the question. This response was shorter, so I’ll add it as an image:

    2025-01_0090

    It seems the AIs don’t quite understand family, and they’re making simple mistakes in putting things together. I could see humans making this mistake, but they’d catch it quickly if someone pointed something out.

    Let’s try one more thing.

    What’s a Family?

    I then ran this prompt: In a family, if I say Alice has 2 brothers and 1 sister, how many children are in the family?

    Easy, isn’t it? If I have 3 siblings, whether brothers or sisters, then there are 4 kids. How does the AI do?

    2025-01_0094

    I suppose Alice could be male (Alice Cooper), but even in that case, the AI seems to struggle to separate out Alice from the counts. For some reason, even listing the siblings out it counts 5 rather than 4. I guess 2+2=5 (for extremely confused AIs).

    Conclusion

    This isn’t to imply the AIs aren’t useful or helpful, but rather they aren’t intelligent in a human sense, or even logical in a human sense. They are very well trained search engines that can put things together in a way that we can’t easily program. They can predict the way to approach problems with mimicry of how humans think.

    However, they don’t have common sense. They are just working with patterns that are very complex, but aren’t intelligent.

    They are useful and can help you solve problems, however, they do make mistakes. Knowing something about the problem you’re asking them to solve is important. These are tools to help us, not tools that replace us.

  • The Local OLLAMA Gui

    I ran a small ollama model in a container and have been doing some experiments. One of the things I wanted to do was get a GUI so I wasn’t always running docker to connect (with –it) or writing code to interact.

    I saw a post somewhere that there is a webgui, so I decided to try it. This post shows the quick setup process.

    This is part of a series of experiments with AI systems.

    Run the Container

    The command I used was this one:

    docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v ollama-webui:/app/backend/data --name ollama-webui --restart always ghcr.io/ollama-webui/ollama-webui:main

    This downloaded and ran the container, which I forgot about until I saw it running in my Docker list.

    Connecting and Getting Going

    The command above runs on port 3000, so I went to port 3000 on my local host and saw this:

    2025-01_0162

    I clicked signup and added info, which isn’t really checked.

    2025-01_0163

    The first account is set at the admin and I see this screen:

    2025-01_0164

    I need to select a model to query, and when I click the drop down, I see the two I downloaded as part of my ollama container setup.

    2025-01_0165

    I picked mistral and started asking questions. I started with clicking the prompt on the screen, and I saw:

    2025-01_0166

    If you play with different models, give this a try as an easy way to run an AI on your local machine and see how well it can help you with anything you do.

    Note, be wary, and make sure you read the disclaimer at the bottom (circled by me)

    2025-01_0154

  • Another AI Faux Pax

    I was experimenting with a local model (article) and as a part of this, I pulled down a web interface for my model in a container. I ran it and had it in the background. I’ve randomly been asking questions as I need to look up things. I’m mostly curious how well it works.

    This week I asked about CDC and got and interesting response.

    This is part of a series of experiments with AI systems.

    Updating a CDC Schema

    I asked this question of my local mistral model: How do I alter a table in SQL SErver that is being tracked by CDC to add a new column?

    That might not be the best way to phrase things, but I was on a call with a customer who was going to enable CDC and wanted to discuss how to manage this with schema changes. I’m not a CDC expert, so I was checking some documentation while chatting and decided to put this query in.

    I got these results,

    2025-01_0153

    I thought I’d missed something, as I had never heard of sp_cdc_refresh_schema. Sure enough, I didn’t see it on MS Docs.

    2025-01_0155

    If I were trying to do this (pretend I’m a copy/paste DBA), I would see this:

    2025-01_0156

    So, the next step is to call the AI on this. It finds that it hallucinated and give me other ideas.

    2025-01_0158

    It gets worse. Now I create a proc and insert into the system tables, which isn’t recommended.

    2025-01_0160

    This won’t work either, but I can see people trying this.

    First, if you get advice from the Internet, please always, always use a sandbox to test (what I also recommended to the customer), and second, treat any AI response like it came from a teenager.

  • Using Copilot to help me update SQL Saturday

    An interesting AI experiment here with Copilot from GitHub in handling some code I don’t work with that often. Read on and watch.

    This is part of a series of experiments with AI systems.

    SQL Saturday Updates

    I keep the sqlsaturday.com site updated with code updates through GitHub. The repository is here: https://github.com/sqlsaturday/sqlsatwebsite

    I had hoped most organizers would fork this and use pull requests to update it, but surprisingly few data professionals are comfortable in Git. It’s fine, and I don’t mind.

    However, sometimes I get text updates that are a bit cumbersome to make. Recently I had someone send me a bunch of table text to update, and as I was editing, I realized that Copilot in VS Code had improved dramatically. You can watch below how it worked.

    Early in the Copilot days, I’d only get the next line added and sometimes the ending tag. Later, it started to suggest things, but from a guess standpoint, not reading what I’d pasted into the editor.

    Now, it’s really, really helpful.

    A cool way that AI can speed up your work, albeit one not a lot of data professionals might need.