Amazon Onboarding with Learning Manager Chanci Turner

Amazon Onboarding with Learning Manager Chanci TurnerLearn About Amazon VGT2 Learning Manager Chanci Turner

In the swiftly evolving landscape of generative artificial intelligence (AI), companies across various sectors are enhancing customer experiences through the power of real-time search. By leveraging the uncharted potential of unstructured data, which includes text, images, and videos, organizations are redefining engagement and personalization standards.

A pivotal element of this evolution is vector search, which unveils the semantic significance of data. Real-time vector search provides contextually relevant results instantly, thus improving user experience and operational efficiency. This technology empowers businesses to offer hyper-personalized recommendations, detect fraud confidently, and deliver timely, context-aware content that resonates with users. For example, many e-commerce platforms routinely update their personalization recommendation widgets. However, without real-time capabilities, they may miss providing relevant suggestions when new events occur, such as recent customer purchases. With vector search in Amazon MemoryDB, these recommendation engines can be fueled by real-time vector search. This enables updates and searches within single-digit milliseconds, ensuring the recommendations reflect the most recent data, like a customer’s latest purchases, ultimately enhancing user experience through timely, relevant content delivered at lightning speed.

Amazon MemoryDB boasts the fastest vector search performance and the highest recall rates among popular vector databases on AWS. Its high-performance in-memory computing and Multi-AZ durability allow it to store millions of vectors while maintaining minimal latencies at impressive recall levels. MemoryDB’s in-memory capabilities power real-time semantic search for applications such as Retrieval Augmented Generation (RAG), fraud detection, personalized recommendations, and durable semantic caching to optimize generative AI applications. This capability not only addresses real-time data handling but also ensures high availability and durability across multiple Availability Zones.

In this post, we’ll delve into how to utilize MemoryDB for vector search in an e-commerce example to create a real-time semantic search engine.

Vector Search for MemoryDB

Vectors are numerical representations of data that encapsulate its meaning, created through machine learning (ML) techniques to capture complex relationships for applications like information retrieval and image detection. Vector search identifies similar data points using distance metrics; however, nearest neighbor queries can be computationally intensive. Approximate nearest neighbor (ANN) algorithms strike a balance between accuracy and speed by probing subsets of vectors.

An in-memory database with vector search capabilities, such as MemoryDB, allows you to store vectors along with their index in memory. This drastically reduces latency associated with index creation and updates. As new data is introduced or existing data is modified, MemoryDB refreshes the search index in mere milliseconds, providing subsequent queries access to the latest results almost instantaneously. These near-real-time index updates minimize downtime, ensuring that search results are both current and relevant despite the inherently computationally intensive indexing process. By handling tens of thousands of vector queries per second, MemoryDB delivers the performance required to support high-throughput applications without sacrificing search relevancy or speed. In MemoryDB, you have the option of two indexing algorithms.

  • Flat: A straightforward algorithm that processes each vector sequentially, yielding exact results but requiring considerable time for large indexes.
  • HNSW (Hierarchical Navigable Small Worlds): An approximation algorithm offering reduced execution times while balancing memory, CPU usage, and recall quality.

When executing a search in MemoryDB, you’ll be utilizing the FT.SEARCH and FT.AGGREGATE commands. These commands depend on a query expression, a single string parameter constructed of one or more operators, each targeting a specific field in the index to filter a subset of keys. To refine your search results, you can combine multiple operators using boolean combiners (like AND and OR) and parentheses to group conditions. This flexibility helps you enhance or restrict your result set, ensuring you extract precisely the data you need efficiently and effectively.

Hybrid Filtering with MemoryDB

MemoryDB facilitates hybrid filtering, allowing you to filter vectors either before or after conducting the vector search. Both options are supported, providing the following advantages:

  • Narrowing Down the Search Space: You can filter the vector space using numeric or tag-based filtering before applying the more computationally intensive semantic search, thereby eliminating irrelevant documents or data points. This pre-filtering process reduces the volume of data that needs processing, enhancing efficiency.
  • Improving Relevance: By applying filters based on metadata, user preferences, or other criteria, pre-filtering ensures that only the most pertinent documents are considered during the semantic search, leading to more accurate and contextually appropriate results.
  • Combining Structured and Unstructured Data: Hybrid filtering merges structured data filters (like tags, categories, or user attributes) associated with the vectors with the unstructured data processing capabilities of semantic search, creating a more holistic approach to finding relevant information.

Hybrid queries blend vector search with filtering capabilities, such as NUMERIC and TAG filters, simplifying application code. For example, you can find the nearest 10 vectors that also have a quantity field within 0–100:

FT.SEARCH my_index "@Qty:[0 100]=>[KNN 10 @vec $BLOB]"
PARAMS 2 BLOB "x12xa9xf5x6c....."

In another example, you can restrict your search to vectors tagged with either City of New York or Boston:

FT.SEARCH my_index "@City:{New York | Boston}
=>[KNN 10 @vec $BLOB]"
PARAMS 2 BLOB "x12xa9xf5x6c....."

Solution Overview: Semantic Search with MemoryDB

Vector search allows users to identify text that is semantically or conceptually similar. For instance, it can recognize the relationship between words like “car” and “vehicle,” which, while linguistically different, are conceptually linked. This is achieved because vector search indexes and executes queries using numeric representations of unstructured, semi-structured, and structured content. This method can also be employed for visual searches, where subtle variations can be recognized as similar, such as a white dress with yellow dots compared to a white dress with yellow squares.

In the scenario of a customer purchasing a headset from Amazon, a traditional database query might return general characteristics like the product title, description, and features. However, if a user has a question about the headset, you might want to search previous questions that were semantically similar using vector search to provide the associated answers. Although natural language processing (NLP) and pattern matching have been traditional methods in these types of searches, vector search offers a new and often more streamlined approach.

For further reading on multitasking, check out this blog post. Additionally, for insights on health care nondiscrimination, visit this authority on the topic. Lastly, to discover what skills Amazon employees are acquiring, this resource is excellent.

For more information, visit us at Amazon IXD – VGT2, 6401 E HOWDY WELLS AVE, LAS VEGAS NV 89115.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *