The Amazon Titan family of models, exclusive to Amazon Bedrock, leverages Amazon's AI and ML expertise. The latest addition, Amazon Titan Text Embeddings V2, is optimized for Retrieval-Augmented Generation (RAG) and pre-trained on 100+ languages and code. It allows users to choose the size of the output vector (256, 512, or 1024), balancing between detail and computational time. Shorter vectors improve response time and reduce storage costs. Vectors with 512 dimensions maintain approximately 99% of the accuracy of 1024-dimension vectors, while 256-dimension vectors maintain 97% accuracy.
The new model also introduces an improved unit vector normalization, improving accuracy when measuring vector similarity. Users can choose between normalized or unnormalized versions of the embeddings based on their use case.
Amazon Titan Text Embeddings V2 is suited for various use cases, including semantic searches on documents, classifying labels into data-based learned representations, and improving the quality and relevance of search results.
RAG uses embeddings to fetch relevant information from a custom source for a large language model (LLM). Embeddings act as condensed summaries that capture the key idea of a text. Amazon Titan Text Embeddings V2 ensures RAG retrieves the most relevant information for the LLM, leading to more accurate answers.
The model is optimized for high accuracy and retrieval performance at smaller dimensions for reduced storage and latency. Users can interact with Amazon Titan Text Embeddings V2 indirectly through Knowledge Bases for Amazon Bedrock or directly invoke the model from their code.
The model accepts three parameters:
inputText
– The text to convert to embeddings.normalize
– A flag indicating whether to normalize the output embeddings.dimensions
– The number of dimensions the output embeddings should have.
Amazon Titan Text Embeddings V2 will soon be the default LLM proposed by Knowledge Bases for Amazon Bedrock. Existing knowledge bases created with the original model will continue to work without changes.