A Short That Missed Its Own Story#
A creator opens Kedapix on a Tuesday morning and types a single line: "Today's biggest news in pro cycling, Tour de France 2026." A few minutes later a finished Short appears in the queue. The voiceover is crisp. The pacing is right. But somewhere in the middle the script mentions a rider who hasn't raced in two years, the title reads "Based on the most recent data, this article covers cycling," and the cover image is a stock photo of a road bike wheel.
Nothing is technically broken. The pipeline ran end-to-end. But the video missed its own story.
For a long time, that gap, between the pipeline ran and the video told the right story, was the hardest part of building a research-driven video tool. The fix wasn't a bigger model or a fancier prompt. It was rebuilding what we ask the model with the help of a knowledge graph.
This post is the story of that rebuild, and why every video Kedapix has shipped after this week is sharper because of it.
What Was Breaking#
If you ran the old Kedapix pipeline on a real news topic and watched closely, you'd see three failure modes show up over and over.
Verbose prompts going straight into search. A creator's prompt arrived with framing like "Context: cycling industry. Specific request: ..." and we passed the entire thing into our search layer. A search system tuned for tight queries was getting paragraphs of preamble. Results came back broad, slow, and noisy. A query that should have taken seconds was taking over a minute.
Generic entity dumps. Our search layer correctly identified the entities in a topic: people, places, organizations, products. That should have been a foundation for richer research. Instead, we treated those entities as a flat list of names and used them as image search queries. A trade publication mentioned in passing would surface as a "thing to find an image of," and we'd end up with a corporate logo where a portrait of an athlete should have been.
Titles parsed by regex. When the search returned an article, we'd run a regex against its first lines to find a title. The regex was fine on clean prose. But search results often started with meta-text like "Based on the most recent data," or "According to recent reporting," and that meta-text became the title.
The pattern across all three: every step was operating on raw information instead of understood information. We had structure available, and we were ignoring it.
Meet Cala#
Before getting into what we changed, a quick detour, because most readers haven't heard of Cala.
Cala is a knowledge-graph API. The simplest way to explain the difference between Cala and a regular search engine: a search engine returns documents, and a knowledge graph returns entities and the relationships between them. Type "Tour de France 2026" into a search engine and you get a list of pages. Ask the same of a knowledge graph and you get back a structured object: the race, the riders entered, the stages, the teams, the dates, each one a node you can ask follow-up questions about.
Cala exposes two endpoints we lean on heavily:
POST /v1/knowledge/search: natural-language input → article + entities + sources. This is the "what's the story?" endpoint.POST /v1/knowledge/query: dot-notation queries that traverse the graph. Things likePogacar.race_results.year=2026orOpenAI.products.released_after=2025. This is the "tell me specific facts about this entity" endpoint.
Those two endpoints, combined the right way, are what made the rebuild possible.
The New Research Pipeline#
The rebuild added four new stages to the research step. Each one solves one of the failure modes above.
Stage 0: Query Distillation#
Before any search ever happens, an LLM rewrites the creator's prompt into a tight, focused query of about 150 characters or less. The original prompt is preserved and used downstream for the article synthesis, but the search layer only sees the distilled version.
In practice this looks like:
Input prompt:
Context: cycling industry.
Specific request: Find news about Tour de France 2026 transfers.
Distilled query:
Tour de France 2026 rider transfers
That single change cut our average search latency by roughly 80%. It also improved hit quality: a knowledge-graph search engine performs noticeably better on short, entity-dense queries than on multi-paragraph prose. Tight in, sharp out.
Stage 1: Knowledge-Graph Search#
The distilled query goes into Cala's search endpoint. We get back three things: an article body, a list of canonical entities, and a list of sources. The entities are the part most people miss: they're not just strings, they're typed nodes (PERSON, ORGANIZATION, EVENT, LOCATION) with stable IDs we can reference in follow-up queries.
This stage hasn't changed much in shape from the old pipeline. What changed is what we do with those entities next.
Stage 1.5: Entity-Aware Chain Queries#
This is the most novel part of the rebuild, and it's the one that changes the most for the final video.
Instead of treating the entities returned by stage 1 as a flat list of names, an LLM looks at the topic and the entities together and writes targeted graph queries, up to three of them, one per top-relevance entity. The queries fan out and run against Cala's graph endpoint in parallel.
The trick is that the queries are topic-scoped, not generic. A naive system asking about an entity called "OpenAI" might return its founding date, employee count, and headquarters address. All true, all useless if the topic is "GPT-5 release." An entity-aware system asks OpenAI.products.year=2025 instead, and gets back exactly the facts the article should be built around.
Topic: GPT-5 release
Entity: OpenAI
Naive query: OpenAI.*
Returns: founded_in, headquarters, employee_count, ...
Topic-aware query: OpenAI.products.year=2025
Returns: model_name, release_date, capabilities, pricing, ...
The result is enriched fact data that's about the topic the creator actually asked about, not background biography on the entity in general.
Stage 2: Article Refinement#
The final new stage is where everything comes together. An LLM takes three inputs: the creator's original prompt, the article body from Cala, and the structured facts from the chain queries, then synthesizes them into a polished markdown article.
Critically, this stage also produces the article's title and summary as proper outputs of the model, rather than leaving them to a regex. That single change retired the era of titles that read "Based on the most recent data, this article covers cycling." The model has the full article in front of it. It writes a title that reflects what the article actually says.
Before and After#
To make all of this concrete, here's how a real pipeline run looked under the old system versus the new one. Topic: recent AI regulatory updates in Europe and the US.
Old pipeline output
- Title: "Based on the most recent data, this article covers regulatory…" (regex caught the meta-text preamble)
- Summary: Verbose, paraphrased the article's first paragraph nearly word-for-word
- Image set: Included headshots of journalists at trade publications mentioned in passing, not the regulators or political figures the article was actually about
- Time to complete: ~2 minutes
New pipeline output
- Title: "Recent AI Regulatory Updates in Europe and the US" (LLM-generated, reads like an actual headline)
- Summary: "This week, Europe unveiled stringent new AI regulations, while contrasting American views emphasise innovation over compliance, compelling stakeholders to reevaluate strategies." (crisp, written for a viewer)
- Image set: Filtered to only PERSON, GPE, LOCATION, and EVENT entities that appear in the refined article body. No more trade-pub headshots
- Time to complete: ~45 seconds
“We noticed our cycling videos had stopped mentioning stage results, facts that were sitting right there in Cala's graph but we weren't asking the right questions. That's when we knew the research step needed to be knowledge-graph aware, not just keyword-aware.
”
What We Learned#
Three lessons stand out from this rebuild, useful whether you're a creator deciding whether to trust Kedapix's output or an engineer building a similar pipeline of your own.
Distill before you query. A model writing for another model produces better queries than a human prompt run through verbatim. Adding an LLM step before the search call sounds counter-intuitive (surely we should minimize hops?), but the latency saved at the search layer more than paid for the extra LLM call. The cost of getting the search wrong is much higher than the cost of one more model invocation.
Graphs beat strings. Whenever the question you want to answer is "tell me specific facts about this thing," a knowledge-graph traversal will outperform keyword search. Keyword search is good at "show me everything about a topic." Graphs are good at the followups.
Synthesis is its own step. Letting an LLM combine raw search content with structured graph facts, producing the title, the summary, and the polished article in one pass, gives you titles and summaries you can actually trust. We were trying to skip synthesis with regex tricks, and it showed up in every video we shipped.
What's Next#
The current pipeline uses three chain queries per article and infers query targets from the topic. The next round of work pushes that further:
We're integrating Cala's introspectEntity endpoint, which lets us ask Cala what queries are actually valid for a given entity rather than guessing. Today the LLM that writes chain queries is operating on intuition. Tomorrow it'll operate on schema. Cleaner queries, fewer empty result sets.
We're also extending chain queries beyond a single hop. Today a query asks about an entity's properties. Multi-hop queries would ask "what does this entity connect to?" and then "what does that entity tell us?", useful for stories that span a network of related actors, like supply-chain coverage or political coalitions.
Both improvements compound the same gain: better facts, fewer irrelevant ones, narrower the gap between the pipeline ran and the video told the right story.
Try It#
Every Kedapix video produced after this week runs through the new research pipeline. If your past trial videos felt close-but-not-quite, this is the upgrade worth retrying.
Next up: deeper looks at multi-hop chain queries and how introspection-driven research expands the topics Kedapix can cover end-to-end.