Rivulet Insights
X-Ray style cast and trivia inside Rivulet
- Concept
- Work in progress, live in Rivulet
- tvOS (inside Rivulet)
- Home server with a GPU
- Cloudflare
Insights is the X-Ray style panel in Rivulet, my Apple TV app for Plex. While something plays you can pull it up to see who's in it and read trivia about the movie or episode. I couldn't find anyone who sells trivia like this to an app like mine. Amazon's X-Ray and Apple's InSight are closed to other apps, so I make my own.
The trivia is made ahead of time on a GPU machine in my house. For each title a pipeline finds the Wikipedia article and, when there's a good one, a fan wiki page. A local language model pulls facts out of those pages and rewrites them. A second pass checks each fact against the passage it came from, and the facts that pass get published as small files keyed by the title's TMDB id. A Cloudflare Worker hands them to the app. If you play something that has no trivia yet, Rivulet asks for it and the home machine moves that request to the front of its queue.
The panel has been in Rivulet since version 1.0.2 in July 2026, and it's still a work in progress. Most of my time since has gone into picking the right source page, especially for single TV episodes. As of late September 2026 the pipeline is on version 7.
- In Rivulet since
- July 9, 2026
- Fact categories
- 7
- Most facts per title
- 60
- Fan wiki picks right in a Sept 2026 trial
- 30/30 shows, 36/40 movies
How it works
Cast and trivia during playback
Open the panel while something plays to see the cast and the trivia for that movie or episode. Cast comes from TMDB. Trivia is split into tabs by category, such as production, casting, lore and goofs, and the panel credits its sources at the bottom.
Top 10
The model scores every fact from 1 to 10 for how interesting it is. Facts scoring 7 or higher fill a Top 10 tab. Anything at 3 or below is dropped before publishing.
Made at home
Every step runs on my home server with one open model. No hosted AI service sees the pages or the facts. The only thing that leaves the house is the finished trivia file.
Wikipedia plus the right fan wiki
The model sorts candidate fan wikis into ones about this title or its franchise, broader wikis, and wikis that have nothing to do with it. Code picks from those answers. The choice is saved, so every later episode of a show goes straight to the same wiki.
Checked before it goes out
A second pass throws out facts the source passage doesn't support, bare cast lines like "X played Y", and near duplicates. It also rechecks each fact's category and spoiler tag. A title keeps at most 60 facts.
Episodes get their own facts
An episode only uses a page written about that episode. When it has facts of its own, the panel shows only those, so watching a season straight through doesn't repeat the same show facts every time. An episode with nothing of its own gets the show's general facts, which leave out plot.
Made on demand
Play something with no trivia and Rivulet asks for it. The request waits in a queue on Cloudflare, and the home machine takes it ahead of any scheduled work. The panel checks again after 20 seconds, then every two minutes for about 20 minutes.
Popular titles ahead of time
Between requests the machine works through TMDB's popular and trending lists and new episodes of shows that are still airing. Recent releases get redone on a short cycle while their wiki pages are still filling in.
Empty results say why
When a title has nothing to share, the app gets a definite empty answer and stops asking. Each empty result records the reason, and the reason sets when it's tried again. Skipped genres like news never come back. An episode with no page yet gets checked daily for its first 30 days, and an older title with no source waits 180 days.
Only Rivulet can ask
Reading trivia and requesting it both require Apple's App Attest, so calls have to come from Rivulet running on an Apple device. Requests carry public TMDB ids and titles, and the Worker keeps no request logs.
Plan
- Done
Panel and trivia pipeline
The Insights panel with cast and trivia went out in Rivulet 1.0.2 in July 2026, backed by the offline pipeline and a Cloudflare Worker.
- Done
On-demand requests and refresh
Playing a title with no trivia queues it. Scheduled work covers popular titles and new episodes, and recent titles get redone while their pages fill in.
- Done
App Attest
Reading and requesting trivia only work from Rivulet on an Apple device.
- Now
Coverage and accuracy
Finding the right page for every title and episode. Version 7 went out on September 28, 2026, a day after a hand review of the model's "no wiki" answers.
- Next
Report a fact
Each fact gets a Report option with a short list of reasons, such as inaccurate or spoiler. A fact that passes a report threshold gets hidden for everyone. The app already reads a hidden-facts list, which stays empty until reporting exists.
- Later
Trivia timed to the scene
Show a fact at the moment it applies. Every copy of a movie has different timing, so the plan is to tie each fact to a line of dialogue and find that line in the viewer's own subtitles.
- Later
Wikiquote as a source
On hold. Fan wiki quote sections already cover most of what it would add.
Milestones
9 milestones since July 2026.
- Milestone
September 2026
Episodes use only their own pages
Version 7Latest- Episode trivia now comes only from a page about that episode. In version 6, 57% of episode facts came from pages shared by three or more episodes, and Law & Order's show article was read 318 times.
- Rereading shared show articles had used about half the GPU time
- Each show gets one set of show-wide facts with no plot, which Rivulet shows when an episode has none of its own
Hand-checked the model's "no wiki" answers
Hand review- Went through 1,426 titles where the model found no fan wiki and set a checked page for 338 of them
- Every hand pick passes the same rules the pipeline uses, and hand picks never expire
The model picks the fan wiki
Wiki picker- The model classifies each candidate wiki and code picks from its answers. In a trial it got 30 of 30 top shows and 36 of 40 top movies right.
- Set up wiki picks ahead of time for about 3,300 popular titles
- An outage on the GPU machine now stops the batch before anything is published, so it can't be saved as "nothing to share"
August 2026
Audit of empty results
Coverage audit- Found 1,059 One Piece episodes marked empty. That wiki files its trivia under "Anime Notes", a heading the pipeline was throwing away.
- Episode pages are looked up directly by name and by number, like "Episode 1084", as well as by search. 8 of 18 sampled "no source" results had been wrong.
- The pipeline logs the headings it discards, so the next missed heading shows up in a report
One model on vLLM
vLLM- Replaced three models on Ollama with one model on vLLM. Each switch between models had reloaded about 20 GB on a 32 GB card while the GPU sat idle.
- Set the model's temperature to zero and held its output to the fact format. At the default temperature, 3.4% of facts on a test section came back malformed and were thrown out.
July 2026
Only Rivulet can read trivia
App Attest- Turned on App Attest checks for reads after 46 on-demand requests from real devices passed them
- Requests for new trivia already required App Attest
Older releases (3)
July 2026
Skip rules and episode pages
Skip rules- Four news, talk and soap shows caused 86% of all empty results. Tagesschau, a nightly news bulletin, has 21,352 episodes. Those genres and reality shows are skipped now.
- Episodes started looking for their own Wikipedia and fan wiki pages. Before, a search with only season and episode numbers kept finding the season index.
- Going by Fandom's own search took wiki choice from 4 of 9 test shows right to 9 of 9. Ranking by size had matched Breaking Bad to the Harry Potter wiki.
Backend moves out of Rivulet, panel goes live
Own repo- Moved the pipeline and the Worker into their own repo. The home machine now pulls an image that builds on every push. Hand-copied code had left it running an old version.
- Rivulet 1.0.2 added the Insights panel the same day
- Fixed interest scores getting wiped before publishing, which had left the Top 10 tab empty
Design and model bake-off
Design- Wrote the design. Trivia gets made once per title, stored by TMDB id and served to everyone as static files.
- Tested two local models on real wiki pages from The Office and Silo. Neither leaked the Silo season 1 finale reveals. I picked gemma4, which kept the source's hedges and tagged spoilers more carefully.
FAQ
Why make trivia instead of licensing it?
I couldn't find anyone who sells it to an app like mine. Amazon's X-Ray and Apple's InSight are closed to other apps, and IMDb's trivia can't be redistributed without an enterprise license. TMDB has cast and metadata and no trivia.
Does the model make things up?
It's only asked to pull facts out of the page in front of it and put them in its own words. A second pass checks each fact against the passage it came from and drops anything the passage doesn't support. The panel names its sources at the bottom.
Where does it run?
The pipeline runs in a container on my home server, which has an RTX 5090. One open model, Qwen3.6 27B served by vLLM, handles every step. Cloudflare stores the finished files, and a Worker serves them to the app.
What does Rivulet send?
To read trivia, the TMDB id of what's playing, plus season and episode for TV. A request for new trivia adds the title and year. Both need App Attest, and the Worker keeps no request logs.
Why doesn't every episode have trivia?
Plenty of episodes have no page of their own on Wikipedia or a fan wiki. Those get the show's general facts instead. News, talk, soap and reality shows are skipped. A new episode gets checked again every day for its first 30 days, since its page often doesn't exist yet.
What about spoilers?
Each fact is tagged as no spoiler, a spoiler for this title, or a spoiler for later episodes. Opening the trivia is asking for it, so the panel shows every fact, plot details included. The show-wide facts leave plot out entirely.
What's the hardest part?
Finding the right page. At different points, ranking wikis by size matched Breaking Bad to the Harry Potter wiki and The Big Bang Theory to Memory Alpha, the Star Trek wiki. A page with no trivia also looks the same from outside as a page whose trivia sits under a heading the pipeline doesn't know. One Piece's wiki files its trivia under "Anime Notes", and 1,059 episodes looked empty until I audited them in August 2026.
Is the trivia timed to the scene?
Not yet. Facts show in the panel whenever you open it. Timing is hard because every copy of a movie has its own cuts and intro length, so the plan is to tie each fact to a line of dialogue and find it in your own subtitles.
Rivulet Insights
X-Ray style cast and trivia inside Rivulet