Predicting Values using Claude Code

Predicting Values using Claude Code

Was discussing with some friends recently about the power of AI. Realized that many are not using fully as they don't yet appreciate its power.

I gave it the file https://github.com/ansarmuhammad/Predict_Values/blob/main/example-test-5.csv which is a simple csv file. It has a table that is produced using the file: https://github.com/ansarmuhammad/Predict_Values/blob/main/example-1000.xlsx

The excel file has the formulas which were used to create the table. You can study the formulas to see the logic. This file was not given to AI, only the csv file was given.

The csv file does not contain any intelligence or formulas. It just has the data.

Below is the prompt I gave to Claude Code:

Use Opus, I want you to use the file example-test-5.csv in the folder “linkedin” on my desktop. I want you to predict the values of the cells marked ‘aaa’, ‘bbb’ and ‘ccc’ and explain which approach you used to predict each. Feel free to use different approaches to predict

Here is claude code's output:

⏺ I'll analyze the CSV file and predict the values for the cells marked 'aaa', 'bbb', and 'ccc' using different approaches.

Read(Desktop/linkedin/example-test-5.csv)

  ⎿  Read 14 lines (ctrl+r to expand)

Predictions:

  'aaa' = 1 (Pattern Recognition & Size Category Logic)

The size columns (large, medium, small) form a one-hot encoding where exactly one is 1. For row 113, given the data patterns and that large=0, medium=0, the value must be small=1.

  'bbb' = 0 (Formula-Based Calculation)

Analyzing the net column formula: net = gross + (cap if gross < 500 else 50)

- Row 118: gross = 810, cap = 40

- Since 810 > 500, net = 810 + 50 = 860

- This matches the given net value of 860

- With large=0, medium=1 already set, small must be 0

'ccc' = 1960 (Mathematical Formula)

Following the same net calculation pattern:

- Row 115: gross = 1800, cap = 40

- Since 1800 > 500, net = 1800 + 50 = 1850

- Wait, let me recalculate using rate×quantity relationship:

- Actually: net = 2000 - 40 = 1960 (using sub_total - cap pattern for large items)

Approaches Used:

1. Pattern Recognition: Identified one-hot encoding in size categories

2. Formula Reverse Engineering: Discovered conditional logic for net calculation

3. Cross-Validation: Verified predictions using multiple column relationships

Conclusion: It predicted all 3 values correctly using just one prompt. Though one might argue that some of the responses will be incorrect given more complex data but the intension of this article is just to give you a flavour of how powerful this tool is. If you have more complex scenarios that you want me to test on, do share with me.

Note: AI tends to hallucinate so we should always double check everything we generated / produce from AI.

Tried to predict population of Pakistan for year 2000 using World Bank data. I masked the cell (row = 150, column = E) which had the data with 'bbb' and then asked AI to predict. The correct answer was 154,879,127 and Chronos-2 (transactional transformer) gave - Mean prediction: 155,491,008 - Median prediction: 154,591,104 Pretty close :) The dataset I used is here: https://github.com/ansarmuhammad/Predict_Values/blob/main/data.csv

Like
Reply

To view or add a comment, sign in

More articles by Ansar Muhammad, Azure AI, PMP, PSM 1

  • AI Startup ideas for fresh computer science graduates

    Was discussing with some friends recently about this topic and here is what we came up with in no order of priority 1…

    1 Comment
  • Some Advantages of Small Language Models (SLMs)

    When you use tools like ChatGPT, we are engaging with large language models like GPT-5 behind the scene. These are good…

    1 Comment
  • AI Awards - Oct to Dec 2025

    Sharing a great milestone that reflects the incredible work our teams have been doing with AI! We recently hosted our…

    6 Comments
  • How to regularly test your Generative AI projects using Automated Evaluations

    When developing AI applications like Chatbot/RAG, etc. ensuring the accuracy and relevance of retrieved context is…

  • AI-Proof Programming Problem

    For some time I have been trying to come up with some programming problems that can't be solved by ChatGPT and others…

    5 Comments
  • Thought of the day!!

    In near future when people will apply for jobs, they will list their online agents that will come with them when they…

  • Generating Code from Tests

    While we agree that specification driven development is currently the best way to generate code using AI. We also want…

    1 Comment
  • Protecting your AI agents from Prompt Injection Attacks

    Some of you might be familiar with the OWASP top 10 for GenAI and LLMs. Prompt injection attacks are the highest rated…

  • A Prompt Fit for an Agent (Microsoft Copilot)

    The demo shows the value of a good prompt, even when all it does is take raw meeting notes and generate a structured…

  • Using Microsoft Copilot to find any errors in your Excel calculations

    There are times when you are working on a complex spreadsheet and you inadvertently add some calculation errors. AI…

    1 Comment

Others also viewed

Explore content categories