mirror of
https://github.com/Hopiu/llm.git
synced 2026-04-22 05:54:45 +00:00
22 lines
1.1 KiB
Markdown
22 lines
1.1 KiB
Markdown
(embeddings)=
|
|
# Embeddings
|
|
|
|
Embedding models allow you to take a piece of text - a word, sentence, paragraph or even a whole article, and convert that into an array of floating point numbers.
|
|
|
|
This floating point array is called an "embedding vector", and works as a numerical representation of the semantic meaning of the content in a many-multi-dimensional space.
|
|
|
|
By calculating the distance between embedding vectors, we can identify which content is semantically "nearest" to other content.
|
|
|
|
This can be used to build features like related article lookups. It can also be used to build semantic search, where a user can search for a phrase and get back results that are semantically similar to that phrase even if they do not share any exact keywords.
|
|
|
|
LLM supports multiple embedding models through {ref}`plugins <plugins>`. Once installed, an embedding model can be used on the command-line or via the Python API to calculate and store embeddings for content, and then to perform similarity searches against those embeddings.
|
|
|
|
```{toctree}
|
|
---
|
|
maxdepth: 3
|
|
---
|
|
cli
|
|
python-api
|
|
writing-plugins
|
|
binary
|
|
```
|