Docs
MAC AWS Bedrock
Supported Operations
Embedding

[Embedding] Generate from text

The Embedding generate from text operation creates embedding from a text provided as input.

Agent Prompt Template

Input Fields

Module Configuration

This refers to the MAC AWS Bedrock Configuration set up in the Gettintg Started section.

General Operation Fields

  • Prompt: This field contains the prompt as plain text for the operation.

Additional Properties

  • ModelName: 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. The following values are accepted: 1024 (default), 512, 256.
  • Normalize: The flag indicating whether or not to normalize the output embeddings. Defaults to true.

XML Configuration

Below is the XML configuration for this operation:

<mac-bedrock:
  embedding-generate-from-text 
  doc:name="Embedding generate from text" 
  doc:id="3e79af34-8551-4a2b-9458-150f2ac22a36" 
  config-ref="AWS" 
  prompt="#[payload.prompt]"
/>

Output Field

This operation responds with a json payload.

Example Output

This output has been converted to JSON.

{
   "inputTextTokenCount":17,
   "embedding":[
      0.0058898926,
      -0.11621094,
      0.26171875,
      -0.30078125,
      -0.15527344,
      -0.24707031,
      0.296875,
      4.15802E-4,
      -0.17285156,
      ...,
      ...
   ]
}
  • inputTextTokenCount: Token used to process the input.
  • embedding: The embedding representation of the inputText

[Embedding] adhoc query

The Embedding adhoc query operation performs an adhoc semantic search on the provided document.

Agent Prompt Template

Input Fields

Module Configuration

This refers to the MAC AWS Bedrock Configuration set up in the Gettintg Started section.

General Operation Fields

  • Prompt: This field contains the prompt as plain text for the operation.
  • FilePath: The file path to the document.

Additional Properties

  • ModelName: 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. The following values are accepted: 1024 (default), 512, 256.
  • Normalize: The flag indicating whether or not to normalize the output embeddings. Defaults to true.
  • OptionType: How the document is splitted.

XML Configuration

Below is the XML configuration for this operation:

<mac-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 Field

This operation responds with a json payload.

Example Output

This output has been converted to JSON.

[
    "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:"
]
  • Response: Scoring Array of the text segments of the document provided.