Aug 28, 2023

Why SentenceBERT Became Useful Again in LLM Pipelines

A short note on why LangChain, FAISS, and RAG made smaller embedding models like SentenceBERT important again.

Our SentenceBert model is recently thriving! Why now?

Recent advances in LLMs made LangChain and FAISS extremely popular. When building a custom LLM pipeline we basically need two models:

  • Large Language Model: e.g. Trurl.
  • Embedding Model: e.g. SBert.

Using the embedding model we can create a vector knowledge base which will be used to pass relevant data to the LLM during inference, for example during chat.

Then, during inference, we find the relevant information in the knowledge base and pass it to the LLM so it can generate more accurate answers. This way not only do we minimize hallucinations, but we can also cite the sources used for the answer.

An LLM can also be used as an embedding model. However, smaller models are usually used for that for efficiency reasons.

What is SentenceBERT?

SentenceBERT is a modification of the pretrained BERT network that uses siamese and triplet network structures to derive semantically meaningful sentence embeddings that can be compared using cosine similarity.

So our SBert can be used as a Polish embedding model. Nice.

It means that the rise in LLM popularity made actually one of our smaller models popular.

Our Large Model was downloaded over 13k times in the last month alone: https://lnkd.in/dRYQWfs9

Contact Voicelab.AI if you need help in implementing your own chatbot.

Original post: LinkedIn

← AI explained