← Back to Home

CineGraph

A movie assistant over a Wikidata film graph: factual questions, recommendations and pictures, in a public web app.

Dec 2025 · UZH AI Core project, team of two · web app Oct 2026

LiveTry the live demo

Overview

CineGraph is a movie assistant built for the University of Zurich AI Core curriculum. It uses a local RDF knowledge graph to connect films with people, genres and other attributes, so one agent can answer factual questions, recommend films and retrieve images.

Developed with Leyla Khasiyeva. I later turned the agent into a public web app: a Next.js site on Vercel that calls a FastAPI service on Modal, which holds the 2.4 million-fact graph in memory.

Interstellar connected to director Christopher Nolan, cast member Anne Hathaway and the science fiction genre.
Illustrative relationships, not a live system result.

What I built

CLI / Speakeasy message

agent.py · interactive_agent.py

main.py: CLI without embeddings

Responser.generate_response()

Label maps → image intent first → other request routing

Person / company / language rewrites can select the factual branch.

↓ One route per request

Images

  • Entity + person / film type
  • IMDb ID → image map
  • Poster, portrait or scene
  • Speakeasy image token

Local inputsRDF graph · images.json

Recommendations

  • Metadata: Weighted Jaccard
  • Optional embedding cosine similarity
  • Constraints → ranked film titles
  • No seeds: theme matching

Local inputsGraph · ratings · entity vectors

Factual questions

  • Entity + relation → SPARQL
  • Graph answer → return directly

↓ No answer, and vectors loaded?

TransE fallback

Head + relation → nearest entity

Entity + relation vectors

Local inputsLocal RDF graph + label maps

↓ Route returns its result

Return to CLI / Speakeasy

  • Formatted answer
  • Ranked titles
  • Image token
  • Explanatory message

Request flow of the original agent from core/responser.py; the three routes are alternative paths, not consecutive stages.

Results

Limits

Links