generative-ai-cdk-constructs

@cdklabs/generative-ai-cdk-constructsDocs


@cdklabs/generative-ai-cdk-constructs / bedrock / CustomTopicProps

Interface: CustomTopicProps

Interface for creating a custom Topic

Properties

definition

readonly definition: string

Provide a clear definition to detect and block user inputs and FM responses that fall into this topic. Avoid starting with “don’t”.

Example

`Investment advice refers to inquiries, guidance, or recommendations
regarding the management or allocation of funds or assets with the goal of
generating returns or achieving specific financial objectives.`

examples

readonly examples: string[]

Representative phrases that refer to the topic. These phrases can represent a user input or a model response. Add up to 5 phrases, up to 100 characters each.

Example

"Where should I invest my money?"

name

readonly name: string

The name of the topic to deny.