Using Synonyms (NLQ)

The following topic explains how synonyms can be surfaced and used in NLQ questions. Synonyms make it easier for users to use multiple, well known terms to describe what they are looking for in their analysis questions without needing to train everybody on a strict set of relevant words of phrases. Pyramid has numerous venues to set and manage synonyms for NLQ: some are governed and managed by admins, some are managed by model developers, some can be manually supplied by end users, some can be set on-the-fly during an NLQ session and some are resolved by GenAI LLMs automatically based on universally understood terms.

NLQ Synonym Use Cases

If a typical end-user was to ask an NLQ along the following lines "Show me revenues, PPU and profits by customer sex, job type by province and SKU" without synonyms, the NLQ engine may fail if its semantic model had these measures and attributes instead:

  • Sales (instead of revenues)
  • Margin (instead of profits)
  • Price per unit (instead of PPU)
  • Gender (instead of sex)
  • Occupation (instead of job type)
  • State (instead of province)
  • Product ID (instead of SKU)

Synonyms allow the AI agents, LLMs and Pyramid to resolve this question properly despite the lack of accuracy in the question's terminology. The synonym setting process allows users of Pyramid to configure and resolve these issues and offer multiple variations of the same labels and terms.

Synonym Setting

The following table outlines the various locations to set up synonyms in the Pyramid platform. Each layer has its purpose and use case. All layers can be set and configured by admins and users except the LLM's own universal synonym mechanisms as part of its internal interpretive capabilities.

Synonym Type

Location

Who

Method

State

Purpose

Semantic Model

Data Source Manager - Model level

Administrators

File Upload

Persistent

Set universally for all users across any aspect of the entire semantic model. Covers only the meta structures of the model. Bulk upload makes setting multiple synonyms easy and efficient.

Vectored Model Column

Master Flows, Vectorization Designer

Semantic Modelers

File Upload

Persistent

Set universally, for all users, covering the selected attributes only. Covers the data of the relevant attribute (i.e. members). Bulk upload makes setting multiple synonyms easy and efficient.

Role Overlays

Data Source Manager - Model Overlays

Administrators

Manual

Persistent

Set by role, overlaying the meta structure details for a specific hierarchy (attribute) or measure. This is useful when different groups of users have different terms for the same items. Manual entry means this should used sparingly when there are significantly diverging terminologies between role groups.

User Overlays

Discover - Measure & Hierarchy Properties

End-Users

Manual

Persistent

Set by the user, properties overlaying the meta structure details for a specific hierarchy, attribute or measure. Manual entry means users will only demarcate things when the originals are unworkable.

Chat Sessions

Chatbot sessions (see below)

End-Users

Manual

Temporary

Set by the user, referring to whatever they want - but usually referring to meta structures.

LLM universal *

Native to LLMs

LLMs

Automatic

Probabilistic

Probabilistically determined by the LLMs universe of data covering anything, but usually referring to meta structures.

* The above table of synonyms applies to the use of Pyramid's internal PLM with the exception of universal set of synonyms.

Setting Synonyms in a Chat Session

Unlike the other synonym options above (with the exception of the LLM), in-session synonyms set by a user are usually temporary and will last just for that session, unless the LLM key being used for the user is unique to that user and state-fullness has been enabled in the LLM to remember a user from one session to the next (a feature becoming more and more prevalent).

Regardless, users can set a temporary synonym simply by implying one in the body of their questions and interactions in the chat session. For example, the user can use the abbreviated term (and effectively a synonym) for gross margin percent - "GM%" - in the follow up after referring to it in a prior step.

  • Initial request: Show me gross margin percent (GM%) and expenses by year and country
  • Follow up: Show me the top 10 countries in this list by GM%