A walkthrough of adding semantic search to the Confetti Compose Multiplatform app using Koog's embeddings and RAG modules. The implementation embeds conference session data using Gemini, stores vectors in a persistent backend via Okio, and exposes a SearchSessionsTool to a Koog AIAgent so it can answer topic-style queries (e.g. 'what AI talks are on?') even when session titles use different wording. Two separate indexes (title-only and title+description) are maintained to improve ranking, and platform-specific cache directories are wired through Koin DI.

5m read timeFrom johnoreilly.dev
Post cover image
Table of contents
A quick word on embeddings and RAGImplementationIndexing the sessionsPersistent storage with OkioExposing it as a toolRelated tweet
145 Impressions