#Data parser

1 messages · Page 1 of 1 (latest)

plain lintel
#

Nothing special, just wanted to share what I made with the world.

At work we handle a lot of unsorted data, and for years we've had to spend hours writing data parsers to handle it... until an AI engineer (that's me) came along and wrote a prompt to do it in one minute

So, naturally, I built a simple proof-of-concept app in WinForms that comes with the prompt pre-inserted (although you can tweak it in the settings menu) that allows you to input data and get a JSON back with the parsed data, which'll save us hours of coding down the line

Again, nothing special, and I'm 100% sure someone's done it before. AI is neat, huh?

#

My favorite part of this is we can run calculations as needed, like the average values shown here. These averages aren't inputted as data, but rather calculated by ChatGPT.

#

Here's the prompt being used:

Below is a string containing a MoveDateTime (Example: 9/6/2023 11:30), WorkOrder (Example: 117475-2.00), 3 TopReadings (Example TopReading1: 0.803), 3 BottomReadings (Example BottomReading1: 0.871), and a PartNumber (Example: 608-960-00) Parse the data and format it in JSON containing the datetime, WorkOrder, values from all readings as well as an average for the TopReadings and BottomReading, and the PartNumber (These averages are not provided, you will need to calculate them).

Example String:
9/6/2023 11:30    117475-2.00            0.803    0.834    0.901    0.871    0.881    0.891        608-960-00
Date Time   WorkOrder     TopReading1 TopReading2 TopReading3 BottomReading1 BottomReading2 BottomReading3   PartNumber

Example Output: 
{
    "MoveDateTime": "9/6/2023 11:30", 
    "WorkOrder": "117475-2.00", 
    "TopReadings": [0.803, 0.834, 0.901],
    "TopReadingAverage": 0.846,
    "BottomReadings": [0.871, 0.881, 0.891],
    "BottomReadingAverage": 0.881,
    "PartNumber": "608-960-00"
}  

 The output should be in JSON, not code. 
 It's also possible the input data may be out of order, attempt to sort it as need fit.

If anyone has any suggestions on how the prompt (or generation settings, more below) could be improved for more accurate and consistent answers.

During my research I found that both the ChatGPT and PaLM API will parse it, but if the temperature is too low (~0.3), the averages are incorrect.

#

I'll probably drop the source on GitHub later tonight, but this thread is just to show the proof-of-concept. This is my first real AI project, so I'm super excited

That's all :)

tough meadow
#

the most basic situation and this is the first project that I found to test data parsing... I've worked a lot with EDI formats (a horrible old way to move data) and I'm expend hours fixing the parser!