Investment Research Documents

Functionality

This module is designed to identify stocks based on the user's question and provide a response by loading each fact sheet into the context window of the language model and executing the requested task. The input is a detailed question from the user related to information within the document.
To aid in identifying the correct document and to correct for spelling mistakes, information from the stock universe .csv file will be used.

Example inputs:

  • "Please provide me the investment rationales for the above-mentioned documents."

  • "Please provide me with a compelling story about NVIDIA for my client."

The user has two options:

  1. Refer to stocks extracted by a table in the previous chat interaction or mentioned in a previous conversation.

  2. Directly mention the relevant stocks in the user question.

The output is the rationale from the document for each stock, provided as answers to the user's questions.

Input

  1. A user question related to detailed information within the document.

  2. Uploaded .csv table and connected documents.
    Examples:

    1. CSV Table Demo_stocks.csv

      image-20240522-123228.png
    2. Document CH0012221716-factsheet.pdf since config for identification is set to "stockFileName": "$ISIN$-factsheet.pdf".

Output

The rationale from the document for each stock, provided as answers to the user's questions.

image-20240519-174617.png

Configuration settings (technical)

This section contains all configurable parameters as seen in the JSON.

Here is the updated input formatted into a table with the specified types and similar text for prompts:


Configuration settings (technical)

This section contains all configurable parameters as seen in the JSON.

General parameters

Parameter

Description

Parameter

Description

languageModel: string

Specifies the language model used to narrow down the documents the user is referring to.

Default: AZURE_GPT_4_32K_0613

modelForDocumentLoop: string

Specifies the language model used for generating a response from a document. This model focuses on providing accurate and contextually appropriate answers derived from the retrieved documents.

Default: AZURE_GPT_35_TURBO_0613

tableConfig: [TableConfig]

Configuration for how information can be extracted from the table. Should be the same as in Investment Research Table

extractionExamples: [JSON]

Few-shot learning examples to identify the referred stocks


Prompts

Only adjust prompts if you are fully familiar with the code logic. Small changes can break the module or reduce the output quality.

Parameter

Description

Parameter

Description

systemPromptStockInfo: string

triggerPromptStockInfo: string

System and trigger prompt used to generate response from document

systemPromptStockExtraction: string

triggerPromptStockExtraction: string

System and trigger prompt used to interpret extraction logic


Author

@Pascal Hauri

 

© 2024 Unique AG. All rights reserved. Privacy PolicyTerms of Service