Ask a question

How CineGraph answers

No language model writes these answers. The agent parses a question with rules, picks one of four pipelines and runs it on a knowledge graph extracted from Wikidata.

Facts in the graph
2,413,825
Entities with an English label
129,673
Entities with a TransE embedding
175,660
Films with a poster
12,326
Type
Conversational agent · UZH AI Core project
Stack
Python / RDFLib / SPARQL / TransE

Overview

Every question takes the same road: it is read, its subject is linked to the graph, and the first pipeline that fits answers it.

  1. Question. Typed in the box, up to 300 characters.
  2. Intent. Rules read the relation, the subject and any year hint.
  3. Entity link. The named film or person is matched to a Wikidata entity, with typo tolerance.
  4. First match wins. The pipelines are tried in this order:
    1. Picture, IMDb image index
    2. Recommendation, Weighted Jaccard similarity
    3. Stored fact, SPARQL query on the graph
    4. Prediction, TransE embeddings
  5. Answer. The text, with its path, query and log as evidence.

The order of the checks

The agent tries the pipelines in this order and answers with the first one that matches.

  1. Picture. Phrases such as “show me”, “poster of” or “scene from” send the question here. The named person or film is resolved to a Wikidata entity, then to its IMDb ID (P345), and looked up in an index of 347k posters, portraits and stills.
  2. Recommendation. Seed films are split out of the question (“The Matrix and Blade Runner”, “something like Chicken Little”) and linked to the graph with typo tolerance; a series or character such as “Star Wars” stands for its films. Every candidate film is scored by the facets it shares with them: genre (5), director (3.5), screenwriter, studio and cast (2.5), composer and producer (1.2), down to country and language (0.4), normalised over everything the seed has, so one shared name alone does not decide. That score is blended 65/35 with embedding similarity. Requests that are really lists, such as “films with Meryl Streep”, become a graph query instead.
  3. Stored fact. A rule-based parser reads the relation (“directed”, “scored”, “who played in”), the subject and any year hint, and splits questions with two parts. The subject is linked to a graph entity by label with typo tolerance; characters and series are answered through the films linked to them. A SPARQL query then runs on the graph, in the inverse direction for questions such as “Which films did Nolan direct?”.
  4. Prediction. If the graph holds no value, the agent falls back to TransE embeddings with 256 dimensions: it adds the relation vector to the film vector and returns the nearest entity. These answers are marked as guesses because they are often wrong.

Reading an answer

Under each answer, “How it was found” opens the evidence inline, and the time the answer took sits beside it. “Read as” says how the question was understood, “Path” prints the triple that was queried (subject, Wikidata property and result), and “Entities” links the films and people it found. The disclosure ends with the SPARQL query and the agent’s own log for that question.

Limits

The graph is a course snapshot of Wikidata. Recent films and some facts are missing, a few entities have no English label and appear as Q-IDs, and some labels were altered on purpose for the course. Questions are matched with patterns, so unusual phrasing can miss; naming the film exactly works best. Images come from TMDB’s CDN.

Who built it

Necati Furkan Çolak and Leyla Khasiyeva, University of Zurich. The agent first ran as a bot on UZH’s Speakeasy chat platform; this site puts the same code behind a web interface.