atomic-generated-answer

This is for:

Developer
In this article

The atomic-generated-answer component uses Coveo Machine Learning (Coveo ML) models to automatically generate an answer to a query executed by the user. For more information, see About Relevance Generative Answering (RGA)

Properties

Property Attribute Description Type Default

collapsible

collapsible

Whether to allow the answer to be collapsed when the text is taller than 250px.

boolean | undefined

tabsExcluded

tabs-excluded

The tabs on which this generated answer must not be displayed. This property should not be used at the same time as tabs-included.

Set this property as a stringified JSON array, e.g.,

 <atomic-generated-answer tabs-excluded='["tabIDA", "tabIDB"]'></atomic-generated-answer>

If you don’t set this property, the generated answer can be displayed on any tab. Otherwise, the generated answer won’t be displayed on any of the specified tabs.

string | string[]

'[]'

tabsIncluded

tabs-included

The tabs on which the generated answer can be displayed. This property should not be used at the same time as tabs-excluded.

Set this property as a stringified JSON array, e.g.,

 <atomic-generated-answer tabs-included='["tabIDA", "tabIDB"]'></atomic-generated-answer>

If you don’t set this property, the generated answer can be displayed on any tab. Otherwise, the generated answer can only be displayed on the specified tabs.

string | string[]

'[]'

withToggle

with-toggle

Whether to render a toggle button that lets the user hide or show the answer.

boolean | undefined

Shadow Parts

Part Description

answer-code-block

The generated answer multi-line code blocks.

answer-emphasis

The generated answer emphasized text elements.

answer-heading-1

The generated answer level 1 heading elements.

answer-heading-2

The generated answer level 2 heading elements.

answer-heading-3

The generated answer level 3 heading elements.

answer-heading-4

The generated answer level 4 heading elements.

answer-heading-5

The generated answer level 5 heading elements.

answer-heading-6

The generated answer level 6 heading elements.

answer-inline-code

The generated answer inline code elements.

answer-list-item

The generated answer list item elements for both ordered and unordered lists.

answer-ordered-list

The generated answer ordered list elements.

answer-paragraph

The generated answer paragraph elements.

answer-quote-block

The generated answer quote block elements.

answer-strong

The generated answer strong text elements.

answer-table

The generated answer table elements.

answer-table-container

The generated answer table container elements.

answer-table-content

The generated answer table content cell elements.

answer-table-header

The generated answer table header cell elements.

answer-unordered-list

The generated answer unordered list elements.

citation

The link that allows the user to navigate to the item.

citation-popover

The pop-up that shows an item preview when the user hovers over the citation.

citations-label

The header of the citations list.

container

The container displaying the generated answer.

copy-button

The "Copy answer" button.

feedback-button

The "like" and "dislike" buttons.

generated-text

The text of the generated answer.

header-label

The header of the generated answer container.

retry-container

The container for the "retry" section.

toggle

The switch to toggle the visibility of the generated answer.