• Home
  • Explore

Text embedding models | πŸ¦œοΈπŸ”— Langchain

python.langchain.com/docs/modules/data_connection/text_embedding/

4 Users

0 Comments

25 Highlights

0 Notes

Tags

Top Highlights

  • two methods: one for embedding documents and one for embedding a query.

  • The Embeddings class is a class designed for interfacing with text embedding models. There are lots of embedding model providers (OpenAI, Cohere, Hugging Face, etc) - this class is designed to provide a standard interface for all of them. Embeddings create a vector representation of a piece of text. This is useful because it means we can think about text in the vector space, and do things like semantic search where we look for pieces of text that are most similar in the vector space.

  • one for embedding a query

  • Embeddings

  • a class designed for interfacing with text embedding models

  • create a vector representation of a piece of text

  • can think about text in the vector space

  • do things like semantic search

  • one for embedding a query.

  • former

  • latter

  • takes a single text

  • takes as input multiple texts

  • some embedding providers have different embedding methods

  • documents

  • queries

  • embed_documents

  • Embed list of texts

  • embed_query

  • Embed a single piece of text for the purpose of comparing to other embedded pieces of texts

Ready to highlight and find good content?

Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.

AboutPrivacyTerms

Β© 2023 Glasp Inc. All rights reserved.