Acronyms are often an integral part of company specific terminologies as discussed here: Incorporate Company-Specific Terminology. Therefore it is extremely useful to be able to include these acronyms when working with LLMs.
Unique provides a convenient way (for developers) to inform FinanceGPT about such acronyms. The command is based on GraphQL and as input expects acronyms as json objects with acronym
and text
attributes.
Below is a curl
command to post a GraphQL query to specify a set of organisation specific acronyms. Just replace the following placeholders: <baseUrl> / <yourToken> and add additional acronyms to the input.
curl --location 'https://gateway.<baseUrl>/chat//graphql' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <yourToken>' \ --data '{"query":"mutation CompanyUpdateData($input: CompanyUpdateInput!) {\n companyUpdateData(input: $input) {\n id\n acronyms\n }\n}","variables":{"input":{"acronyms":[{"acronym":"ARB","text":"Allgemeine Rechtschutzbedingungen (ARB)"}]}}}'
A similar GraphQL
query in postman looks as shown in the below screenshot.
Behind the scenes?
When a user submits a message in Chat,
It is first scanned to see if any acronyms from the specified list were used.
The acronyms are replace by the corresponding expanded text.
This message is finally used as the user message to pass along the rest of the LLM data pipeline.
Important tips
Acronyms are case-sensitive. This is done so that acronyms are not mistaken for common language constructs. (eg. some acronyms like "PAS" have a meaning in French)
In the expansion of an acronym, always include the acronym itself. This ensures that both the acronym and its expansion are available during search and comprehension for the LLM.