Dmytro Kurets

Tomb rAIder: AI Search with Kotlin

Is your vector search failing to respect hard constraints like price? Learn to build a smarter, hybrid AI search system using Kotlin and the 'filter before you vector' principle.

Tomb rAIder: AI Search with Kotlin
#1about 4 minutes

Setting up the AI search stack and data ingestion

The technology stack is outlined, including Kotlin, Spring AI, and pgvector, along with the process for ingesting hotel data and creating embeddings.

#2about 6 minutes

Demonstrating the limits of basic vector search

A simple vector search fails to respect hard constraints like price and amenities, leading to irrelevant results and a low evaluation score.

#3about 3 minutes

Improving search results with manual hard filters

Manually separating a query into a residual semantic part and hard SQL filters significantly improves the relevance and accuracy of search results.

#4about 4 minutes

Using an LLM to automatically decompose user queries

An LLM is prompted to parse a natural language query, successfully extracting structured filters like price and amenities from the unstructured text.

#5about 6 minutes

Choosing specialized tools for price and amenity extraction

Instead of a single LLM, specialized tools like DJL for amenity matching and Duckling for price extraction offer more robust and efficient solutions.

#6about 9 minutes

Building a modular query decomposition service in Kotlin

The application architecture uses a composer service with focused, independent extractors for price, amenities, and residual intent, leveraging Kotlin's concurrency features.

#7about 3 minutes

Final demonstration of the hybrid search application

The completed application successfully processes complex queries by decomposing them into hard filters and a residual vector search, delivering highly relevant results.

#8about 1 minute

Key principles for building effective AI search systems

The talk concludes with key takeaways, emphasizing using the right tool for each job, filtering before vector search, and decomposing queries into modular components.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

Related Articles

View all articles

From learning to earning

Jobs that call for the skills explored in this talk.