ai-cfia / fertiscan-pipeline

A Python package for GPT-related functionalities in FertiScan.
MIT License
0 stars 1 forks source link

As a dev, I want to block the duplication/spreading of data between the manufacturer and company sections. #40

Open SamuelPelletierEvraire opened 1 month ago

SamuelPelletierEvraire commented 1 month ago

Description

Right now the application mixes or duplicates the information in the "company" and "manufacturer" fields. This leads to confusion and inaccuracies in the data presented to the users. To resolve this, a simple fix can be implemented to manage the results obtained by GPT on the backend.

Bug Summary: The backend returns results that often duplicate or mix the information in the "company" and "manufacturer" fields. This causes redundancy and data inconsistency.

Steps to Reproduce:

  1. Login into the app.
  2. Analyse picture give in this issue or that contain multiple place where the same information of compagny is wrote.
  3. Observe the returned results in the respective fields.

Expected Behavior:
The information in the "company" and "manufacturer" fields should be distinct without duplication or mixing. Each field should contain only relevant information.

Actual Behavior:
The "company" and "manufacturer" fields often contain duplicated or mixed information, causing confusion and redundancy.

Environment:

Commit Hash: [e.g., 1cb3d1876a7b4c2435b4a5067e5ae53631063948]

OS Version: Windows 10

Browser Version: Chrome Version: 129.0.6668.59 (Build officiel) (64 bits)

Logs and Screenshots:
Follow this link to the folder data

Suggested Fix: (facultatif)
Manage the results obtained by GPT on the backend. Currently, the backend returns a result almost identical to the frontend. A simple string matching algorithm could be used to check if the strings are in multiple field. If so, everything should be merged into the "company" for easier user compliance.

snakedye commented 1 week ago

If I remember correctly the suggestion was to replace manufacturer and company by a list of organizations.

k-allagbe commented 1 week ago

If I remember correctly the suggestion was to replace manufacturer and company by a list of organizations.

Yes. @Francois-Werbrouck is this how you suggested it?:

{
  "organizations": [
    {
      "name": "GreenGrow Inc.",
      "address": "123 Green Road, Farmville, State, 12345",
      "website": "https://www.greengrow.com",
      "phone_number": "123-456-7890"
    },
    {
      "name": "BlueTech Solutions",
      "address": "456 Blue Avenue, Technopolis, State, 67890",
      "website": "https://www.bluetechsolutions.com",
      "phone_number": "987-654-3210"
    }
  ]
}
Francois-Werbrouck commented 1 week ago

Exactly, we should create (https://github.com/ai-cfia/ailab-datastore/issues/212) an issue in the datastore based on these changes