Use AI to map data from a spreadsheet to the database

Hi, I am working on an inventory management app. Since clients are using different spreadsheet formats for their existing inventory, i want to be able to take in an inventory spreadsheet and have AI map it to the format i use in my app. Since i have no experience integrating with AI, I am curious what do you think is the best approach for this problem and what model should i use? Any suggestions are welcome The app is in typescript express
Solution:
yeah, you don't need to whole data to gpt. just send header of sheet & db column, then get matching data. And then you can extract real row datas from sheet with result map...
Jump to solution
5 Replies
.The_bl | 0x662c
@Mika you may need to parse sheet using xlsx, csv-parser and then extract header from there. And then you can get each column data what you want and can map to database. I don't think AI mandatory. If you wanna AI to do it, then you may need to use GPT-4 simply
Mikarica
MikaricaOP19h ago
Yes, simply parsing the headers and mapping to database does't need AI if the sheets i will be getting are unifrom, but i wan't to make it possible for clients to simply send their existing inventory spreadsheet without having to first change it to a specific format. Example: Let's imagine we have a column for a materialName, In the one clients sheet it could be simply "name" in others it could be "material name" or "name" in another language etc... I need AI to take those columns and format them to work with what i have in my app
.The_bl | 0x662c
oh, then use gpt-4-turbo model it will help you to extract out correct datas after parse header of excel sheet, then you can pass the header columns and expected mapping database fields. GPT will return mapping data with each header column and db column field. Then you can use @Mika
Mikarica
MikaricaOP19h ago
So you mean there is no need to send the data, just header columns and let AI just tell me which columns from their spreadsheet to map to which columns in my spreadsheet? That sounds like a good approach. Thank you @.The_bl | 0x662c !
Solution
.The_bl | 0x662c
yeah, you don't need to whole data to gpt. just send header of sheet & db column, then get matching data. And then you can extract real row datas from sheet with result map

Did you find this page helpful?