Skip to content

gc-garcol/ollama-spring-ai-embedding-model

Repository files navigation

Embeddings Model

  • Embeddings are numerical representations of text, images, or videos that capture relationships between inputs.
  • Embeddings work by converting text, image, and video into arrays of floating point numbers, called vectors. These vectors are designed to capture the meaning of the text, images, and videos. The length of the embedding array is called the vector’s dimensionality.
  • By calculating the numerical distance between the vector representations of two pieces of text, an application can determine the similarity between the objects used to generate the embedding vectors.

Stacks

Setup

ollama pull mxbai-embed-large

Test

Query:

curl --location 'http://localhost:8080/animal' \
--header 'Content-Type: application/json' \
--data '{
  "query": "Which animal is best friend?",
  "limit": 1
}'

Result:

[
    "Dog: Known as loyal and friendly companions, dogs are social animals often regarded as \"man's best friend.\" They come in various breeds, each with unique temperaments and characteristics, and are used for companionship, work, and therapy.\n"
]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages