Question Extractor — Unique AI Documentation

Question Extractor

Functionality

This module is designed to extract all questions from a document, which can for example be a meeting transcription or a request for proposal.

Sequence of events within module

Input

The input document is preferably a Word file (the module also works with PDF but no highlighting functionality is available in this case.) uploaded to the designated scope in the Knowledge Center, which is connected to the extractor module or directly to the chat.

A user then uses the assistant linked to this module to extract all questions, e.g.

If the file is directly uploaded to the chat, the user can use the following prompt:

Meeting Transcript Format:

Output

The output consists of:

Reference in Code in AI Module Template

QuestionExtractor

Configuration settings

This section contain all configurable parameters.

Default Configuration

{
    "languageModel": "AZURE_GPT_4o_2024_1120",
    "companyNameExtraction": {
        "systemMessage": "You are given a file name. Your task is to extract the name of the company contained in the file name. If you can not extract a company name, return \"NONE\". \"IC\" is not a company name.",
        "userMessage": "$document_name",
        "exampleMessages": [
            {
                "role": "user",
                "content": "20240215_annual_report_ubs.pdf"
            },
            {
                "role": "assistant",
                "content": "{\n    \"company_name\": \"UBS\"\n}"
            }
        ]
    },
    "questionExtraction": {
        "useCompanyName": true,
        "additionalInputKeywords": [],
        "dummyExtendedQuestionPlaceholder": "Additional Input",
        "sheet1Name": "Sheet1",
        "sheet2Name": "Sheet2",
        "originalQuestion": {
            "system": "Your role as an assistant is to analyze a transcript from a meeting about an investment opportunity.",
            "trigger": "Transcript:\n''\n${chunk}\n''\n\nJSON output::"
        },
        "additionalInputs": {
            "system": "Your purpose is to convert a text with bullet points into a structured JSON object.",
            "trigger": "Input:\n''\n${chunk}\n''\n\nJSON output:"
        }
    },
    "excelGenerator": {
        "uploadScopeId": null,
        "uploadToChat": true,
        "tableDataFormat": {
            "bg_color": "#FFFFFF",
            "bold": false,
            "font_color": "black",
            "text_wrap": true,
            "border": 1,
            "valign": "top"
        }
    }
}

General parameters

| Parameter | Description | Type | Default | | languageModel | used LLM model | string | AZURE_GPT_4o_2024_1120 | | companyNameExtraction | Configuration for the service that attempts to extract a company name from the uploaded document’s filename. | object | | | questionExtraction | Configuration for question extraction service | object | | | excelGenerator | See Excel Generator | object | |