Investment Research Table

Functionality

This module is designed to query a table by using natural language input. The query will be constructed in the background.

Input

  1. A user queries the table with natural language inputs. For example:

    1. My client is interested in sustainable stocks based in Switzerland.

    2. Show me stocks with a good outlook from the US.

  2. Uploaded .csv table and optional connected documents into the corresponding scope in the knowledge center.
    Examples:

    1. CSV Table Demo_stocks.csv

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

Output

A table in the specified format, referencing each fact sheet, based on the available data.

image-20240518-093005.png

Configuration settings (technical)

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

Here is the input formatted into a table with the specified types and structure:

General parameters

Parameter

Description

Parameter

Description

languageModel: string

Specifies the language model used

tableConfig: [TableConfig]

Configuration for how the table should look in the end, nested configs

searchExamples: [JSON]

Few-shot learning examples to construct the SQL query in the background

showTableReference: boolean

Indicates if the table reference should be shown


TableConfig (nested within General parameters)

Parameter

Description

Parameter

Description

languageCode: string

Language code (e.g., "en", "de")

language: string

Language of the table (e.g., "english", "german")

tableFileName: string

Name of the CSV file containing the stock data

fallback: boolean

Indicates if a fallback language is used

header: string

Header text for the table, where you can include references

repeatingTable: string

Format in which the table is presented to the user

noStocksFound: string

Message displayed when no stocks match the query

footer: string

Footer text for the table

stockFileName: string

Naming convention for the fact sheet files (e.g., "$ISIN$-en.pdf")

nameColumn: string

Specifies the name of the columns and their order

columns: [Column]

Different columns with properties such as name, type, displayed, and identifying

rowFilter: string

Filter to apply rows in the table configuration


Column (nested within TableConfig)

Parameter

Description

Parameter

Description

name: string

Name of the column

type: string

Data type of the column (e.g., String, Number)

displayed: boolean

Whether the column is displayed in the table

identifying: boolean

Whether the column is an identifying column


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

systemPromptTableSearch: string

System prompt used to interpret user input and form queries

triggerPromptTableSearch: string

Trigger prompt used to interpret user input and form queries


Author

@Pascal Hauri

 

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