Define Acronyms

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.

To get the token and the URL check this: How to get a Token for our APIs

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.

Screenshot 2024-05-31 at 16.30.00.png

Behind the scenes?

When a user submits a message in Chat,

  1. It is first scanned to see if any acronyms from the specified list were used.

  2. 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

  1. Case Sensitivity:

    • Acronyms are case-sensitive. This is crucial to prevent them from being mistaken for common words or phrases. For example, "PAS" might have a specific meaning in French, and case sensitivity helps to distinguish it correctly.

  2. Inclusion of Acronym in Expansion:

    • When expanding an acronym, always include the acronym itself in the expansion in brackets. This practice ensures that both the acronym and its expanded form are searchable and comprehensible for the Language Learning Model (LLM). For example,

      • {"acronym": "PAS", "text": "Personnel Allocation System (PAS)"}

  3. Per Company Settings:

    • The settings for acronyms are made at company level. This means that each company can itself determine how acronyms are handled to ensure that the company terminology is understood by the system.

  4. Avoiding Misinterpretation:

    • Consider that acronyms may have different meanings in different contexts. To avoid confusion, clearly define acronyms within your documentation. This practice helps ensure that acronyms are not misinterpreted or replaced incorrectly.


Author

@Sadique Sheik

 

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