Support queues ask the same question in a hundred phrasings. An exact-match cache never fires; a semantic one turns most of that traffic into a vector lookup instead of a generation. Which is a lot of money, and one subtle correctness question: what does "the same question" mean, and what do you throw away when the cache is full?
Write semantic_cache_hits(vectors, threshold=0.9, capacity=3).
Process vectors in order, as a stream of query embeddings. For each one, return the index of the cached query that served it, or -1 if it missed.
>= threshold. If several qualify, the most similar wins.capacity, evict the least recently used entry.Return the list of results, one per input query.
Build the architecture on a canvas: place the components, configure them, connect them into a data flow, and write a short reason for each one. The AI reviewer grades your design against a rubric written specifically for this problem.
Minimum 5 components · needs a wide desktop screen