No updates detected yet. GitHub releases will appear here.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Live demo: malayalam-filmgraph.vercel.app — ask in plain English, then open How this was answered to see the entities, intent scores and the exact SQL behind every answer.
A proof-of-concept GraphRAG system: a knowledge graph of Malayalam cinema (films, people, songs, places, remakes, adaptations, awards) that you can question in plain English. It shows answers as chat cards with Wikipedia / IMDb / YouTube / where-to-watch links, an interactive graph that highlights the result, and a step-by-step trace of how each answer was produced.
It is built deterministic-first, local-model-second. An intent router plus entity recognition fills parameterised graph queries; this is the same pattern as a Grakn + Dialogflow assistant. Small local models (Ollama) are used only for relation extraction, plot search, era summaries and NLU fallback. No paid AI API is used.
| Graph | 6,791 films · 23,729 people · 132k credit triples · 13k songs / 39k song credits · ~4.9k link-anchored relation triples (remakes, adaptations, shooting locations, awards, debuts…) · 17.7k text chunks · 74k Neo4j nodes / 240k relationships |
| Sources | Wikipedia film lists and pages (CC BY-SA) · Wikidata (CC0) · IMDb non-commercial datasets (local only, never deployed) |
| Stores | Neo4j 5.26 (Docker or AuraDB Free) or a SQLite mirror with the same query templates |
| Models | gemma4-e4b (chat/JSON) + embeddinggemma (embeddings) via Ollama, both local; optional WebLLM in the browser |
| Quality | see evals/report.md: intent accuracy, entity-linking F1, count exactness vs ground-truth SQL, retrieval ablation, Neo4j/SQLite parity |
More detail: docs/graphrag.md (architecture, diagram, design decisions, interview notes) ·
docs/product-and-cost-plan.md (product, quotas, costs).
Answers below are from the live demo (hosted mode: no LLM, every number comes from a graph query).
| Question | Answer (abridged) |
|---|---|
| How many films did Mohanlal and Mammootty do together? | 53 films with both on screen: 46 in full roles, 7 where one is a cameo or plays himself. Narration-only credits (Barroz, Pathonpatham Noottandu) are listed separately |
| Mohanlal actor and Priyadarshan director | 30 films (1984–2021), e.g. Marakkar (2021), Oppam (2016) |
| Which director has Mammootty worked with most? | Joshiy and I. V. Sasi, 33 films each |
| Who directed Chemmeen? | Ramu Kariat (1966) |
| Songs sung by K. J. Yesudas composed by Raveendran | 174 songs (1979–2006) |
| How is Fahadh Faasil connected to Prem Nazir? | 2 films apart, via M. B. Sreenivasan |
| Which films are remakes of Manichitrathazhu? | Chandramukhi and 3 more, each with its evidence sentence |
| Films shot in Munnar | 10 films (2011–2025) |
| Films like Kireedam | Chenkol first: shared creatives fused with plot similarity |
| Mohanlal movies in the 90s | 65 films (1990–1999) |
Follow-ups keep context: Mohanlal and Mammootty films → what about with Priyadarshan? → only in the 90s.
flowchart LR
subgraph Local["Local (laptop): full GraphRAG"]
direction TB
SRC["Wikipedia · Wikidata · IMDb (local only)"] --> BUILD["Build pipeline<br/>collect → resolve → extract → embed → communities"]
BUILD --> DB[("films.sqlite3<br/>raw claims + kg_* graph")]
DB --> NEO[("Neo4j<br/>(optional)")]
DB & NEO --> SRV["filmgraph serve"]
OLL["Ollama: Gemma 4 + embeddinggemma"] --> SRV
end
DB -- "filmgraph snapshot<br/>IMDb stripped, graph rebuilt" --> SNAP[("deploy.sqlite3.gz<br/>read-only")]
subgraph Hosted["Vercel (hosted demo): no LLM, $0"]
direction TB
EDGE["Vercel edge<br/>DDoS · WAF rate limit · bot rules"] --> FN["Python function<br/>same server code"]
FN --> RO[("SQLite in /tmp<br/>PRAGMA query_only")]
end
SNAP --> RO
USER(("Visitor")) --> EDGE
flowchart LR
A["Wikipedia film lists<br/>1928 → today"] --> B["Film pages<br/>infobox · cast · songs · plot"]
W["Wikidata claims"] --> C
B --> C[("Raw claims<br/>every row keeps its source URL")]
C --> D["Entity resolution<br/>shared IDs → name blocking"]
D --> E[("Canonical graph kg_*<br/>films · people · credits")]
B --> F["Triples from prose<br/>hyperlinks → types → cue rules → LLM relabel"]
F --> E
E --> AP["Appearance types<br/>role · cameo · self · voice · archive"]
B --> G["Chunks → BM25 + embeddings"] --> E
E --> H["Louvain communities + reports"]
E --> I["Snapshot for hosting<br/>drop IMDb, rebuild graph, gzip"]
sequenceDiagram
autonumber
actor U as Visitor
participant API as /api/chat
participant NLU as NLU
participant R as Intent router
participant G as Graph query
participant C as Answer composer
U->>API: "Mohanlal actor and Priyadarshan director"
API->>API: rate limits · size and origin checks
API->>NLU: question
NLU->>NLU: gazetteer finds 2 people, binds roles actor / director
NLU->>R: "PERSON actor and PERSON director"
R->>R: rules → classifier (TF-IDF + LR) → intent = collaboration
R->>G: films_with(Mohanlal as actor, Priyadarshan as director)
G-->>C: films with provenance per credit
C-->>U: count + film cards + answer subgraph + trace (SQL, scores, timings)
This is the beginning of the README. Read the rest at the original. Read the full README ↗