<ms-bedrock:
embedding-generate-from-text
doc:name="Embedding generate from text"
doc:id="3e79af34-8551-4a2b-9458-150f2ac22a36"
config-ref="AWS"
prompt="#[payload.prompt]"
/>
Configuring Embedding Operations
Configure the EMBEDDING Generate from Text and EMBEDDING Adhoc Query operations.
Configure the EMBEDDING Generate from Text Operation
The EMBEDDING Generate from Text operation creates embeddings from a text provided as input. Embeddings are numerical vector representations of text that can be used for tasks like text similarity, clustering, and search functionalities.
To configure the EMBEDDING Generate from Text operation:
-
Select the operation on the Anypoint Code Builder or Studio canvas.
-
In the General properties tab for the operation, enter these values:
-
Prompt
The text as plain text for the operation to generate embeddings from.
-
Model name
The name of the LLM. You can select any model from the supported LLM Providers.
-
Region
The AWS region.
-
Dimension
The number of dimensions the output embeddings should have. Accepted values are 1024 (default), 512, or 256.
-
Normalize
A flag indicating whether to normalize the output embeddings. Defaults to
true.
-
This is the XML for this operation:
Output Configuration
This operation responds with a JSON payload. This is an example response:
{
"inputTextTokenCount":17,
"embedding":[
0.0058898926,
-0.11621094,
0.26171875,
-0.30078125,
-0.15527344,
-0.24707031,
0.296875,
4.15802E-4,
-0.17285156,
...,
...
]
}
-
inputTextTokenCountThe number of tokens used to process the input text.
-
embeddingAn array of floating-point numbers representing the vector embedding of the input text.
Configure the EMBEDDING Adhoc Query Operation
The EMBEDDING Adhoc Query operation performs an adhoc semantic search on the provided document.
To configure the EMBEDDING Adhoc Query operation:
-
Select the operation on the Anypoint Code Builder or Studio canvas.
-
In the General properties tab for the operation, enter these values:
-
Prompt
The prompt as plain text for the operation.
-
File path
The file path to the document.
-
Model name
The name of the LLM. You can select any model from the supported LLM Providers.
-
Region
The AWS region.
-
Dimension
The number of dimensions the output embeddings should have. Accepted values are 1024 (default), 512, or 256.
-
Normalize
A flag indicating whether to normalize the output embeddings. Defaults to
true. -
Option type
How the document is split.
-
This is the XML for this operation:
<ms-bedrock:
embedding-adhoc-query
doc:name="Embedding adhoc query"
doc:id="ccc3c3cb-1ecd-496e-8cc6-7e5ac891fdf9"
config-ref="AWS"
prompt="#[payload.prompt]"
filePath="#[payload.filePath]"
optionType="PARAGRAPH"
/>
Output Configuration
This operation responds with a JSON payload. This is an example response:
[
"0.7222009830758953 - 1. Adaptive Noise Cancellation: Mule TXY Pro features advanced adaptive noise\ncancellation technology that dynamically adjusts to your surroundings, ensuring an\nimmersive sound experience even in the noisiest environments.",
"0.6548797751679963 - 4. Crystal Clear Call Quality: Equipped with multiple beamforming microphones, Mule\nTXY Pro ensures crystal clear voice calls by isolating your voice and reducing\nbackground noise.",
"0.6080078517625709 - Mule TXY Pro: Elevate your auditory experience to new heights with the most advanced\nearpods on the market. Whether you're a music enthusiast, a busy professional, or an avid\ntraveler, Mule TXY Pro delivers the performance and convenience you need.",
"0.6033637899209172 - Introducing Mule TXY Pro, the latest innovation in wireless audio technology. Engineered for\nthe ultimate auditory experience, Mule TXY Pro combines cutting-edge features with sleek,\nergonomic design to deliver unparalleled sound quality and convenience.",
"0.5763494555939309 - 8. High-Fidelity Sound: Powered by graphene-enhanced drivers, Mule TXY Pro delivers\nstunning high-fidelity sound with deep bass, crisp mids, and sparkling trebles, ensuring\nevery note is heard with perfect clarity.",
"0.5502839961220158 - 6. Ergonomic Design: Mule TXY Pro's ergonomic design and customizable ear tips\nguarantee a secure and comfortable fit, making them perfect for extended wear during\nworkouts, travel, or daily commutes.",
"0.47535332600339536 - 7. Sweat and Water Resistant: With an IPX7 rating, Mule TXY Pro is built to withstand\nintense workouts and adverse weather conditions, making them the ideal companion for\nany activity.",
"0.4625065928913214 - ● Durability and Comfort: The IPX7 rating and ergonomic design ensure that Mule TXY\nPro is both durable and comfortable for all-day wear.",
"0.4469227711336364 - Why Mule TXY Pro is the Best:",
"0.427673823435529 - ● Cutting-Edge Noise Cancellation: Adaptive noise cancellation provides a personalized\nlistening environment, making them ideal for frequent travelers and commuters.",
"0.41792318702734876 - \nProduct Name: Mule TXY Pro",
"0.2836238616522896 - ● Unmatched Sound Quality: The combination of graphene drivers and 360-degree\nspatial audio offers an audio experience that rivals high-end studio headphones.",
"0.25629929834096177 - ● Smart and Intuitive: AI-powered features and intuitive touch controls offer a level of\nconvenience and usability that is unmatched by other earpods.",
"0.20080554821060592 - 9. Intuitive Touch Controls: Effortlessly control your music, manage calls, and activate\nvoice assistants with intuitive touch-sensitive controls on each earbud.",
"0.19433385553615035 - 2. 360-Degree Spatial Audio: Experience music and media like never before with\n360-degree spatial audio, creating a theater-like soundscape that surrounds you in rich,\nmulti-dimensional sound.",
"0.19263522837318664 - 3. AI-Powered Smart Assist: Integrated AI assistants provide seamless control over your\nmusic, calls, and notifications. Voice-activated commands make hands-free operation a\nbreeze.",
"0.18936083867608916 - 10. Seamless Connectivity: Bluetooth 5.3 technology ensures a stable, low-latency\nconnection with your devices, while multi-device pairing lets you switch seamlessly\nbetween your phone, tablet, and laptop.",
"0.1497476123913745 - ● Exceptional Battery Life: Extended battery life with quick charging capabilities means\nyou spend less time charging and more time enjoying your music.",
"0.13411454064304643 - 5. Extended Battery Life: Enjoy up to 12 hours of continuous playback on a single charge,\nwith the sleek charging case providing an additional 24 hours of battery life. Fast\ncharging capabilities mean you can get 3 hours of playback from just 15 minutes of\ncharging.",
"0.07138466714333906 - Key Features:",
"0.04727589821132713 - \n",
"-6.651552304116816E-4 - Description:"
]
The response is a scoring array of the text segments of the document provided, ordered by relevance to the prompt.



