About
MovRec is a small conversational movie recommender built with FastAPI, Postgres, and pgvector, grounded by Google's Gemini API. A user message is saved and handed to Gemini along with the conversation history and a single tool the model can call: a semantic search over the movie catalog. When a recommendation is called for, Gemini decides on its own to call that tool with a natural-language query plus any genre or year filters it inferred; the tool embeds the query with Gemini's embedding API and runs a cosine-distance nearest-neighbor search against a pgvector column holding a pre-computed embedding for every movie, so retrieval is a real vector search over plot, genre, and title representations rather than a keyword match. Gemini then writes a final reply grounded only in the retrieved movies, which the system prompt explicitly forbids it from inventing. The catalog is a 250-movie subset of the MovieLens ml-latest-small dataset, enriched with real plot summaries pulled from the TMDb API. The whole app — FastAPI, Postgres/pgvector, and the service itself — runs as two containers via Docker Compose.
Links