# Best practice for fast embedding with OpenAI? ( or similar performance )

**URL:** <https://forum.weaviate.io/t/best-practice-for-fast-embedding-with-openai-or-similar-performance/20772>\
**Category:** General\
**Tags:** technical\
**Created:** [April 24, 2025, 1:33pm UTC](https://forum.weaviate.io/t/best-practice-for-fast-embedding-with-openai-or-similar-performance/20772 "2025-04-24T13:33:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jasper\_van\_den\_Berg](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/jasper_van_den_berg/32/2268_2.png) [@Jasper\_van\_den\_Berg](https://forum.weaviate.io/u/Jasper_van_den_Berg)\
**Post date:** [April 24, 2025, 1:33pm UTC](https://forum.weaviate.io/t/best-practice-for-fast-embedding-with-openai-or-similar-performance/20772/1 "2025-04-24T13:33:59Z")

</div>

Hi there!

We’ve been integrating Weaviate with LangChain into our agentic application and the performance of the vector searches seemed great, although lately I noticed a bottleneck coming from the embedding. Even for just very simple queries it would take like 1.5-2 seconds to complete.

We’re using the weaviate-langchain lib to integrate weaviate and currently rely on it to build the vector store like:

```auto
               WeaviateVectorStore.from_documents(
                    documents,
                    client=self.client,
                    embedding=self.embeddings_model,
                    index_name=index_name,
                    uuids=uuids
                )

```

which creates the Weaviate vector store without a configured vectorizer, instead using our custom embedding models to do near\_vector searches.

I noticed that this is currently causing additional latencies of like +0.5-0.8s for just embedding a short message, due to latencies caused by interacting with the OpenAI embeddings API endpoint.

What’s the best practice with Weaviate to mitigate this latency while still maintaining high performing embeddings for similarity searches?

Any insights or advice would be highly appreciated!

Thanks in advance.

Kind regards,  
Jasper

---

<div class="post-metadata">

**Author:** ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/8085_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)\
**Post date:** [June 12, 2025, 11:32am UTC](https://forum.weaviate.io/t/best-practice-for-fast-embedding-with-openai-or-similar-performance/20772/2 "2025-06-12T11:32:48Z")

</div>

Hello @Jasper_van_den_Berg,

I would say the latency because custom embedding model (OpenAI API) outside of Weaviate, which introduces network round-trips. This can be a common bottleneck, especially when using external APIs for embedding generation.

You could use Weaviate integration with OpenAI, configure your Weaviate collection with a vectorizer (e.g., `text2vec-openai`). This way, Weaviate handles embedding generation internally, often with optimized batching and reduced network overhead.

> **[Text Embeddings | Weaviate](https://weaviate.io/developers/weaviate/model-providers/openai/embeddings)**
>
> OpenAI Embedding Model Provider

Best regards,

**Mohamed Shahin**  
Weaviate Support Engineer  
(Ireland, GMT/UTC timezone)
