Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions mulesoft-vectors/1.1/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: mulesoft-vectors-connector
version: '1.1'
display_version: 1.1 (Mule 4)
title: MuleSoft Vectors Connector
nav:
- modules/ROOT/nav.adoc
asciidoc:
attributes:
page-component-desc: Enables you to integrate AI into your data for smarter search and RAG
page-connector-type: Connector
page-connector-level: Select
page-exchange-group-id: com.mulesoft.connectors
page-exchange-asset-id: mule4-vectors-connector
page-runtime-version: 4.9.0
page-release-notes-page: release-notes::connector/mulesoft-vectors-connector-release-notes-mule-4.adoc
page-vendor-name: MuleSoft
page-vendor-title: MuleSoft
page-notice-banner-message: Standard support for Java 8 and 11 ends in August 2026 for 4.6 LTS. Plan your upgrade path for apps that are running on Java 8 or 11 accordingly.
11 changes: 11 additions & 0 deletions mulesoft-vectors/1.1/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.xref:index.adoc[MuleSoft Vectors Connector]
* xref:index.adoc[MuleSoft Vectors Connector Overview]
* xref:mulesoft-vectors-connector-studio.adoc[Using Anypoint Studio to Configure MuleSoft Vectors Connector]
* xref:mulesoft-vectors-connector-config-acb.adoc[Using Anypoint Code Builder to Configure MuleSoft Vectors Connector]
* xref:mulesoft-vectors-additional-config.adoc[MuleSoft Vectors Connector Additional Configuration Information]
** xref:configuring-embedding-operations.adoc[]
** xref:configuring-store-operations.adoc[]
** xref:configuring-transform-operations.adoc[]
* xref:mulesoft-vectors-connector-xml-maven.adoc[MuleSoft Vectors Connector XML and Maven Support]
* xref:mulesoft-vectors-connector-examples.adoc[MuleSoft Vectors Connector Examples]
* xref:mulesoft-vectors-connector-reference.adoc[MuleSoft Vectors Connector Reference]
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
= Configuring Embedding Operations

Configure the *[Embedding] Generate from text* operation.

== Configure the Embedding Generate from Text Operation

The *[Embedding] Generate from text* operation splits the text into chunks of the provided size and creates numeric vectors for each text chunk.

The *[Embedding] Generate from text* operation can be followed by either the *[Store] Add* operation or the *[Store] Query* operation. Both operations can use the output payload of the *[Embedding] Generate from text* operation without any transformation. When the *[Embedding] Generate from text* operation is used before the:

* *[Store] Add* operation: The text along with the generated embeddings can be ingested into a vector store.
* *[Store] Query* operation: The text is first used to generate an embedding that is then used to perform a query against the vector store.
+
NOTE: When generating an embedding from text for query purposes, don't provide any segmentation fields. Leave the *Max Segment Size (Characters)* and *Max Overlap Size (Characters)* fields blank.

To configure the *[Embedding] Generate from text* operation:

include::connectors::partial$t-configure-operations.adoc[]
* *Input Texts*
+
Enter the input list of texts to generate embeddings from.
* *Max Segment Size (Characters)*
+
Enter the segment size of the document to be split in. This can be left blank as it is an optional input.
* *Max Overlap Size (Characters)*
+
Enter the overlap size of the segments to fine-tune the similarity search. This can be left blank as it is an optional input.
* *Model (Deployment) Name*
+
Enter the embedding model (deployment) name.

This is the XML for this operation:
[source,xml,linenums, subs=attributes+]
----
<ms-vectors:embedding-generate-from-text
doc:name="[Embedding] Generate from text"
doc:id="92c7a561-7b99-4840-8ffb-f680c9e392dc"
config-ref="MuleSoft_Vectors_Connector_Embedding_config"
maxSegmentSizeInChar="3000"
maxOverlapSizeInChars="300"
embeddingModelName="sfdc_ai__DefaultOpenAITextEmbeddingAda_002">
<ms-vectors:text ><![CDATA[#[payload.text]]]></ms-vectors:text>
</ms-vectors:embedding-generate-from-text>
----

=== Output Configuration

This operation responds with a JSON payload. This is an example response:

[source,json]
----
{
"embeddings": [
[-0.00683132, -0.0033572172, 0.02698761, -0.01291587, ...],
[-0.0047172513, -0.03481483, 0.02046227, -0.037395656, ...],
...
]
"text-segments": [
{
"metadata": {
"index": "0"
},
"text": "In the modern world, technological advancements have become .",
},
{
"metadata": {
"index": "1"
},
"text": "E-commerce giants like Amazon and Alibaba have redefined ..",
},
...
],
"dimension": 1536
}
----

* `embeddings`: List of generated embeddings.
** `list-item` (embedding)
* `text-segments`: List of segments.
** `list-item` (text-segment)
*** `text`: Text segment.
*** `metadata`: Metadata key-value pairs.
***** `index`: Segment or chunk number for the uploaded data source.
* `dimension`: Dimension of the embeddings.

The operation also returns attributes that aren't within the main JSON payload, that include information about token usage, for example:

[source,json]
----
{
"embeddingModelDimension": 1536,
"embeddingModelName": "sfdc_ai__DefaultOpenAITextEmbeddingAda_002",
"tokenUsage": {
"outputCount": 9,
"totalCount": 18,
"inputCount": 9
},
"additionalAttributes": {}
}
----

* `embeddingModelDimension`: Dimension for the embedding model used.
* `embeddingModelName`: Embedding model name used.
* `tokenUsage`: Token usage metadata returned as attributes
** `outputCount`: Number of tokens used to generate the output
** `totalCount`: Total number of tokens used for input and output.
** `inputCount`: Number of tokens used to process the input.

== See Also

* xref:index.adoc[MuleSoft Vectors Connector Overview]
* xref:mulesoft-vectors-connector-reference.adoc[MuleSoft Vectors Connector Reference]
* https://help.salesforce.com[Salesforce Help]
Loading