Azure OpenAI Embeddings
Azure OpenAI Embeddings turns text into a numeric fingerprint of its meaning using an OpenAI model deployed in your own Microsoft Azure account. With that fingerprint, NappAI can find the documents that say something similar to what you are looking for, even when they use different words, for example in a knowledge base.
You connect the component to a vector database, which uses it both to store your documents and to search them. Use it if your company works with Azure OpenAI and wants the text to be processed in its own Azure resource.
When to use it
- Give an agent the knowledge in your manuals, contracts or FAQs by storing them in a vector database.
- Build an internal search that finds documents by their meaning, not only by exact words.
- Your company already has an Azure OpenAI resource with an embeddings model deployed.
Configuration
| Field | What it does |
|---|---|
| Credential (required) | The credential of the service Azure OpenAI API. Pick one with Choose an option or create one with Add new credential. See Credentials. |
| Azure Endpoint (required) | The address of your Azure OpenAI resource, for example https://example-resource.azure.openai.com/. You will find it in the Azure portal. |
| Deployment Name (required) | The name you gave in Azure to the deployment of the embeddings model. |
Advanced options
| Field | What it does |
|---|---|
| API Version | The version of the Azure OpenAI service to use. Default: 2023-08-01-preview. |
| Dimensions | The size of the fingerprint, as a count of numbers. Only some models support it. Empty, the model’s own size is used. |
Batch processing
With the Batch Mode switch on, the component runs once for each item of the list you connect to Batch Input and returns all the results together as a list. Parallel Executions sets how many items are processed at the same time (1 to 5). Skip if Empty Batch Input skips the component when the list arrives empty, and Skip Branch if Empty Output stops the following components when the result is empty. More in Key concepts.
Output
- Embeddings: the model that calculates the fingerprints, ready to use. Connect it to the Embedding input of a vector database: Astra DB, Cassandra, Chroma DB, Couchbase, Elasticsearch, FAISS, Milvus, MongoDB Vector Store, PGVector, Pinecone, Qdrant, Redis, Supabase Vector Store, Upstash, Vectara, Weaviate Cloud (v4). Other components with an input of this type accept it too, such as Semantic Text Splitter or Text Embedder.
Example
A dental clinic, Clínica Sonrisa Norte, wants its assistant to answer using its patient care protocols.
- In a loading flow, split the documents into chunks with Recursive Character Text Splitter and pass them to Chroma DB with Operation set to
Add. - Add Azure OpenAI Embeddings and connect its Embeddings output to the Embedding input of Chroma DB.
- In the assistant flow, use the same Chroma DB collection with the same Azure OpenAI Embeddings component to find the chunks that answer each question.