After partitioning, chunking, and summarizing, the embedding step creates arrays of numbers
known as vectors, representing the text that is extracted by Unstructured.
These vectors are stored or embedded next to the text itself. These vector embeddings are generated by an
embedding model that is provided by
an embedding provider.
You typically save these embeddings in a vector store.
When a user queries a retrieval-augmented generation (RAG) application, the application can use a vector database to perform
a similarity search in that vector store
and then return the items whose embeddings are the closest to that user’s query.
The following example shows a document element with an illustrative embedding vector:
Generate embeddings
To have Unstructured generate embeddings, do the following:- For Unstructured Pipelines users, add an Embedder node to an Unstructured custom workflow.
- For Unstructured API users, add an Embedder node
when you
create a workflow,
update a workflow, or
create a workflow job that processes local files.
For curl, add an object to the
workflow_nodesarray. For Python, add aWorkflowNodeto aWorkflowNodescollection.
Chunk sizing and embedding models
Each embedding model accepts a limited number of tokens per input. Chunks that exceed the limit can cause a workflow failure or produce embeddings that omit text. Set the Chunker node’s Max Characters to the value recommended for your embedding model in the following table. For IBM models, Unstructured truncates each input to the first 2,000 characters.The following table applies to Unstructured Let’s Go, Pay-As-You-Go, and Business SaaS accounts.For dedicated instance and in-VPC deployments, see AI providers.
* This approximate value equals the embedding model’s token limit multiplied by 3.5.

