Models
Models are a set of algorithms designed to understand patterns and process information, generating output that is often similar to human brain functions.
By understanding the pattern from a large dataset, models can generate and predict results in various output formats, including text, image, and others.
some models are pre-trained on algorithms for specific tasks with large datasets, which can easily understand, process, transform, and generate results, also known as GPT i e, Generative Pre-trained Transformer.
Prompts
In simple terms, prompts are the core input information provided to the Model for processing and generating the required results. Creating an effective prompt to maximise the benefits from an AI model is both science and craft. There are lots of techniques that help in improving the desired results, also known as "Prompt Engineering".
learn more about how to create the most effective prompts in a research paper
One of the most effective prompts you can use starts with the phrase, “Take a deep breath and work on this step by step.”
Prompt Templates
Prompts are user-provided text, but they have to be passed to the Model in a predefined format. Templates are predefined layout that provides a set of information; they set the basic tone and establish the context of the request.
Spring AI uses the OSS library StringTemplate for this purpose.
Explain like I'm five about {content}.
Embeddings
Input to the Model is provided as human text, image, audio, or video format. Model converts the data into arrays of floating-point numbers and maintains relationships between them.
Numerical representations of arrays of floating-point numbers, called vectors.
The length of the embedding array is called the vector’s dimensionality.
Since the vector represents information in the form of floating-point numbers, it's possible to calculate the distance between them and determine the similarity.
Vector Embeddings are very important in the Retrieval Augmented Generation (RAG) pattern.