Define Acronyms
2 min read
Acronyms are often an integral part of company specific terminologies as discussed here:
Therefore it is very useful to be able to include these acronyms when working with LLMs.
Unique provides a convenient way (for developers) to inform Unique AI 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.
Refer to ๐ Multitenant Region URLs to find the correct base URL for your deployment.
To get the token and the URL check this: How to get a Token for the GraphQL 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.

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
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.
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)"}
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.
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.