---
schema_version: "1"
id: 3102cde4791e02e39315ef4b18728e64ac230cfbeeef93b7beead1b6f587fcd4
title: MuleSoft Vectors Connector Examples
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mulesoft-vectors-connector/latest/mulesoft-vectors-connector-examples.md
canonical_url: https://docs.mulesoft.com/mulesoft-vectors-connector/latest/mulesoft-vectors-connector-examples
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 3b63d93b03142882d22bd888c4af0011ae79701dd5956fe0bb7edd2dc3529462
description: MuleSoft Documentation Site
release: "1.1"
latest: true
---
---
product: MuleSoft Vectors Connector
version: 1.1
is-latest-version: true
---

# MuleSoft Vectors Connector Examples

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

These examples show you how to use MuleSoft Vectors Connector.

## Example: File

This flow listens for HTTP requests on `/store01`, retrieves a file from an Amazon S3 bucket using a
provided or default key, and parses its content into text using a text parser. The text is then
split into smaller overlapping chunks, converted into embeddings using an embedding model, and
stored in a vector store named `loadf02`.

```xml
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http"
	xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd">

	<flow name="vectordemo01julyFlow5" doc:id="21acd6e4-cc51-4532-8277-0fb44f88a7f2" >
		<http:listener doc:name="Listener" doc:id="dd002e73-b0b4-4174-8a07-ca2b335ddff3" config-ref="HTTP_Listener_config" path="/store02" />
		<set-variable value="#[attributes.queryParams.keyname default 'key3']" doc:name="Set Variable" doc:id="f2531d58-ddf7-4728-8729-8c57d9f437d5" variableName="key" />
		<s3:get-object doc:name="Get Object" doc:id="af0724a0-380f-475c-9282-4f9c1fb08518" config-ref="Amazon_S3_Configuration" bucketName="bucket-amar" key="#[vars.key]"/>
		<ms-vectors:transform-parse-document doc:name="[Transform] Parse document" doc:id="09159639-7dcb-499e-a133-f609e03cf94d" config-ref="MuleSoft_Vectors_Connector_Transform_config" >
			<ms-vectors:document-parser-parameters >
				<ms-vectors:multiformat-document-parser-parameters />
			</ms-vectors:document-parser-parameters>
		</ms-vectors:transform-parse-document>
		<ms-vectors:transform-chunk-text doc:name="[Transform] Chunk text" doc:id="4ad439c1-c77e-4a1c-b1af-67f6846e66c9" maxSegmentSizeInChar="500" maxOverlapSizeInChars="10" />
		<ms-vectors:embedding-generate-from-text embeddingModelName="sfdc_ai__DefaultAzureOpenAITextEmbeddingAda_002" doc:name="[Embedding] Generate from text" doc:id="6b02b772-b57c-4c4a-bb6c-6754f171b83a" config-ref="MuleSoft_Vectors_Connector_Embedding_config">
			</ms-vectors:embedding-generate-from-text>
		<ms-vectors:store-add doc:name="[Store] Add" doc:id="e8109f15-0589-4b67-8a0b-ba9c5911a8ae" config-ref="MuleSoft_Vectors_Connector_Store_config" storeName="loadf02" >
			<ms-vectors:metadata-entries />
		</ms-vectors:store-add>
	</flow>
</mule>
```

## Example: PDF

This flow listens for HTTP requests on `/store02`, retrieves a PDF from an Amazon S3 bucket using a
provided or default key, and parses its content into text using a MultiFormat Document parser. The
text is then split into smaller overlapping chunks, converted into embeddings using an embedding
model, and stored in a vector store named `loadf02`.

```xml
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http"
	xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd">

	<flow name="vectordemo01julyFlow5" doc:id="a048f363-b639-44ca-b068-baea0e2266e4" >
		<http:listener doc:name="Listener" doc:id="11d2d9fe-46dc-41fd-baa1-0d55ed7c822c" config-ref="HTTP_Listener_config" path="/store02" />
		<set-variable value="#[attributes.queryParams.keyname default 'key3']" doc:name="Set Variable" doc:id="6735365b-48eb-4ec8-a008-abb459064d1a" variableName="key" />
		<s3:get-object doc:name="Get Object" doc:id="32412129-dce4-4352-8ee4-7f7e35012ffb" config-ref="Amazon_S3_Configuration" bucketName="bucket-amar" key="#[vars.key]"/>
		<ms-vectors:transform-parse-document doc:name="[Transform] Parse document" doc:id="0e98a350-54f2-4db9-aaaf-2d83e7ebc7ce" config-ref="MuleSoft_Vectors_Connector_Transform_config" >
			<ms-vectors:document-parser-parameters >
				<ms-vectors:multiformat-document-parser-parameters />
			</ms-vectors:document-parser-parameters>
		</ms-vectors:transform-parse-document>
		<ms-vectors:transform-chunk-text doc:name="[Transform] Chunk text" doc:id="6632401c-749d-4ccc-a688-d5e899e7909b" maxSegmentSizeInChar="500" maxOverlapSizeInChars="10" />
		<ms-vectors:embedding-generate-from-text embeddingModelName="sfdc_ai__DefaultAzureOpenAITextEmbeddingAda_002" doc:name="[Embedding] Generate from text" doc:id="c59a5fa4-c659-4b37-ae2e-7871b30d00dc" config-ref="MuleSoft_Vectors_Connector_Embedding_config">
			</ms-vectors:embedding-generate-from-text>
		<ms-vectors:store-add doc:name="[Store] Add" doc:id="b1b5f72a-7c67-48c5-8828-d0073345517e" config-ref="MuleSoft_Vectors_Connector_Store_config" storeName="loadf02" >
			<ms-vectors:metadata-entries />
		</ms-vectors:store-add>
	</flow>
</mule>
```

## See Also

- [MuleSoft Vectors - Additional Configuration Information](https://docs.mulesoft.com/mulesoft-vectors-connector/latest/mulesoft-vectors-additional-config)

- [Using Anypoint Studio to Configure MuleSoft Vectors Connector](https://docs.mulesoft.com/mulesoft-vectors-connector/latest/mulesoft-vectors-connector-studio)

- [MuleSoft Vectors Connector Reference](https://docs.mulesoft.com/mulesoft-vectors-connector/latest/mulesoft-vectors-connector-reference)
