[D] Question and Answer Position Detection

Hi everyone, I need advice on which direction to explore.

I have a large table with varying formats usually questionnaires. I need to identify the positions of questions and answers in the document.

I can provide the data in any readable format (JSON, Markdown, HTML, etc.).

In the image, I’ve included a small example, but the actual table can be more complex, including checkboxes, selects, and other elements.

https://preview.redd.it/mi2b6evfiz3g1.png?width=1944&format=png&auto=webp&s=aa1b0d6458912676ab6844f0cc00a31d19c868f0

Ideally, I want to extract the information from the provided data and get back a JSON like the example below.

[
    {
        "question": "o you perform durability tests on your products or product?",
        "questionPosition": "1,2",
        "answerPosition": "3",
        "answerType": "Yes / No, because"
    },
    {
        "question": "Are the results available on request?",
        "questionPosition": "4,5",
        "answerPosition": "6",
        "answerType": "Yes / No, because"
    },
    {
        "question": "Are the tests performed by an accredited laboratory?",
        "questionPosition": "7,8",
        "answerPosition": "9",
        "answerType": "Yes / No, because"
    },
    {
        "question": "Laboratory name",
        "questionPosition": "10",
        "answerPosition": "11",
        "answerType": ""
    }
]

Is there are specific model for this task, I have tried LLaMa, chatGPT, Claude big ones not stable at all.

Leave a Reply