A Knowledge Graph + RAG system for nuanced questions about crime-film narratives.
Knowledge GraphRAGLLaMA 3.1Neo4jOllama
The problem
Standard question answering struggles with film narratives. Character dynamics, evolving plots and implicit themes are not simple facts, and plain LLMs hallucinate when asked open-ended or non-factual questions about a script.
Approach
An LLM extracts entities (characters, places, objects, events) from the screenplay and builds a knowledge graph in Neo4j.
The script is also chunked and embedded into a vector database for broader context.
At question time, the system retrieves structured facts from the graph and similar passages from the vector store, then fuses them.
A local LLaMA 3.1 model, run through Ollama, reasons over the fused context and answers with a rationale.
Results
Evaluated on 50 hand-annotated question-answer pairs from the script of The Godfather Part I.
Questions span five types: factual, inferential, comparative/relational, causal/temporal and dialogue analysis.
The annotated dataset is public on Zenodo.
Published as a Springer book chapter (see the Research section).