# Pre-trained embedding model on API specification files for RAG use case

**URL:** <https://discuss.huggingface.co/t/pre-trained-embedding-model-on-api-specification-files-for-rag-use-case/160404>\
**Category:** Beginners\
**Created:** [June 23, 2025, 3:49pm UTC](https://discuss.huggingface.co/t/pre-trained-embedding-model-on-api-specification-files-for-rag-use-case/160404 "2025-06-23T15:49:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vradhik](https://avatars.discourse-cdn.com/v4/letter/v/a88e4f/32.png) [@vradhik](https://discuss.huggingface.co/u/vradhik)\
**Post date:** [June 23, 2025, 3:49pm UTC](https://discuss.huggingface.co/t/pre-trained-embedding-model-on-api-specification-files-for-rag-use-case/160404/1 "2025-06-23T15:49:36Z")

</div>

Hello, I have a set of files containing API specifications. Some of them are in json/yaml using swagger or openAPI specs, most of them are in either markdown or multi sheet excel file.  
The markdown and excel files dont follow a standard template but contain API spefications info like the path, method, request, response, return code, ..etc  
For technical document like this, what would be a good pre-trained embedding model to use to cater to returning precise results for API catalog search/chat/find-APIs-for-this-userstory kind of RAG use case.  
Let me know if you need further details, any recommendation or direction in this regard is appreciated.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [June 24, 2025, 3:04am UTC](https://discuss.huggingface.co/t/pre-trained-embedding-model-on-api-specification-files-for-rag-use-case/160404/2 "2025-06-24T03:04:44Z")

</div>

For RAG applications, I think the first step is to find an embedding model with good retrieval performance from the MTEB leaderboard and try it out. For that type of document, it might be better to use a straightforward, high-performance model rather than a specialized model. If multilingual support is required, it might be a good idea to use a larger model.

> **[MTEB Leaderboard - a Hugging Face Space by mteb](https://huggingface.co/spaces/mteb/leaderboard)**
>
> This application lets you compare various text and image embedding models across different languages by selecting from a range of prebuilt benchmarks and languages. You can filter models to fit you...

> **[How to Choose the Best Embedding Model for Your LLM Application | MongoDB](https://www.mongodb.com/developer/products/atlas/choose-embedding-model-rag/?msockid=3932c30cf4966dbf0cb9d786f5166c6f)**
>
> In this tutorial, we will see why embeddings are important for RAG, and how to choose the best embedding model for your RAG application.

---

<div class="post-metadata">

**Author:** ![Yesseniar](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/yesseniar/32/49985_2.png) [@Yesseniar](https://discuss.huggingface.co/u/Yesseniar)\
**Post date:** [June 24, 2025, 3:34am UTC](https://discuss.huggingface.co/t/pre-trained-embedding-model-on-api-specification-files-for-rag-use-case/160404/4 "2025-06-24T03:34:53Z")

</div>

I’ve worked on a similar project where we had to deal with inconsistent API documentation formats like markdown and Excel sheets. Using a model like OpenAI’s embeddings combined with some custom preprocessing to normalize the data worked well. Also, for quick brainstorming or even casual coding breaks, I sometimes use [Omegle](https://omegleweb.io) to chat with strangers about tech topics—it’s surprisingly helpful to get fresh perspectives on tricky problems!
