Search for paths.
Verify the constraints.
CCoR lets a language model choose relations, while a knowledge graph executes the actual joins and filters. That separation makes complex answers easier to audit—and avoids throwing away good answers too early.
A correct answer is not necessarily a grounded answer
Imagine asking: “Which American directors have worked with actors who won the Best Actor Oscar?” A model might remember some famous names. Even if it happens to return the right names, we still cannot tell whether it checked the award, the collaboration, and the nationality.
A knowledge graph stores explicit facts as triples: (subject, relation, object). For instance, a simplified graph might store (Best Actor Oscar, winner, Actor A) and (Actor A, worked_with, Director D). A graph query can bind variables to every matching entity and return the supporting facts.
Task 1: retrieve candidates
Start at the award, follow its winners, then follow their collaborations to directors.
Actor → worked_with → Director
This establishes who could answer the question. It does not establish nationality.
Task 2: enforce the constraint
For each candidate director, verify a graph path to the country specified in the question.
Only candidates with this matching graph evidence survive.
The paper’s key move is to make both tasks executable. Its predecessor, CoR, focuses on candidate retrieval. CCoR adds an on-demand constraint chain so that “American” is checked in the graph rather than guessed from the model’s memory.
Why searching over entities can lose answers
An entity-centric agent expands a node, sees many neighbors, and retains only a few for the next hop. If an award has 97 winners but a beam retains only 3, collaborators connected exclusively to the other 94 become unreachable. The problem gets worse when entities have opaque IDs and no readable names: a model cannot reliably rank a person it cannot identify.
Relation-centric exploration instead chooses a small number of relation types, such as winner, and leaves the matching entities as query variables. All winners along a retained relation path remain eligible. CCoR removes intermediate entity pruning, not all pruning: it still ranks and prunes relation alternatives.
Two chains, one shared search engine
Let G be the graph and E_topic the linked topic entities. The paper separates candidate construction from constraint verification:
E_con = ExecuteComposed(G, c_main, c_con, target)
E_final = E_cand ∩ E_con
If no explicit constraint remains, the final set is simply E_cand. In implementation, one composed SPARQL query can enforce the join without materializing two separate sets.
The relation-centric loop
- Search relations: ask the graph which predicates can extend the current path. Intermediate entities are implicit variables, not a list of names for the LLM to rank.
- Prune relations: score predicates for semantic alignment, consistency with the existing chain, and proximity to the answer. Keep the top
kchoices. - Update memory: push alternative chains onto a stack in increasing score order, so the best one is popped first.
- Choose an action: extend the chain, backtrack to an alternative, stop, or hand off to constraint exploration.
Main-chain decisions
Forward when the answer space is not reached. Backtrack when the current branch is inconsistent. Stop when the chain is complete with no remaining constraint. Constraint when the answer space is reached but a condition is still unresolved.
Constraint-chain decisions
Extract the unresolved sub-question, its source variable, and then search. Forward if the target is not reached; Backtrack for an invalid branch; Stop when a concrete constraint target can be selected and the composed query executed.
The constraint source is not necessarily the final answer variable. The method selects the appropriate entity position along the main chain. For the directors example, nationality belongs to the director variable—not the Oscar-winning actor variable. Choosing the wrong source can produce an executable but semantically incorrect query.
A simplified executable query
# Teaching schema, not the original Freebase predicates.
SELECT DISTINCT ?director WHERE {
:BestActorOscar :winner ?actor .
?actor :worked_with ?director .
?director :type :Director .
?director :nationality :USA .
}Here ?actor can bind to every matching actor, including actors with no readable name. The last clause enforces the nationality condition. A type clause makes the simplified collaboration relation precise; the paper’s illustrative chains abstract away much of the actual graph schema.
Two fallback layers—and why they matter
| Outcome | What produces the final answer? | Paper’s state |
|---|---|---|
| Both chains succeed, or no constraint is needed | Explicit graph execution | structured |
| Constraint-chain exploration fails | Graph retrieves candidates; LLM applies Global Entity Filtering (GEF) in one pass | synthesis |
| Main-chain exploration fails irrecoverably | LLM answers directly using chain-of-thought prompting | parametric |
GEF preserves a useful graph-derived candidate set but gives up graph verification of the constraint. Direct generation gives up executable graph evidence altogether. The system logs the fallback layer and cause rather than treating every answer as equally grounded.
Watch answers disappear—or acquire evidence
This synthetic graph has four award-winning actors and four director candidates. Names, IDs, and nationality facts below are invented. The simulator compares a deliberately simple entity beam with full relation-path execution; it does not run an LLM or reproduce benchmark scores.
Toy “model memory” incorrectly believes Blake is American, and correctly remembers the other three.
The reference answers stay {Rowan, Morgan, Jules} when the nationality edge is removed: this intentionally contrasts the toy’s known world truth with what an incomplete graph can establish. Relation search, backtracking, query interpretation, and automatic failure detection are not simulated; the relation chains are fixed.
The core is a join followed by a verified filter
This small JavaScript prototype is the successful-execution kernel, not the whole CCoR agent. It assumes entity linking and relation selection have already supplied the correct chains. The playground uses this same graph-traversal pattern.
const T = [
['award', 'winner', 'a1'],
['award', 'winner', 'opaque-id'],
['a1', 'worked_with', 'Rowan'],
['opaque-id', 'worked_with', 'Jules'],
['Rowan', 'nationality', 'USA'],
['Jules', 'nationality', 'USA']
];
const hop = (sources, relation) => new Set(
T.filter(([s,r]) => sources.has(s) && r === relation)
.map(([, , o]) => o)
);
const run = (start, chain) => chain.reduce(hop, start);
const candidates = run(new Set(['award']),
['winner', 'worked_with']);
const answers = [...candidates].filter(d =>
run(new Set([d]), ['nationality']).has('USA')
);
console.log(answers); // ['Rowan', 'Jules']No name lookup is required for opaque-id. There is no instruction to keep only the “most relevant” actors: relation-path execution preserves all bindings along that path.
What a complete implementation still needs
- A topic-entity linker and correct predicate directions for the target graph.
- A relation-search interface over variable-bound paths, plus LLM ranking and action prompts.
- A stack of alternative relation chains and explicit depth / exploration budgets.
- A constraint source and target resolver, and a SPARQL compiler that preserves their bindings.
- Separate logs for query execution, retrieved evidence, fallbacks, and final grounding state.
Do not mistake this kernel for a generic query language: comparisons, temporal conditions, negation, and multiple interacting constraints may require richer operators than these two fixed paths.
Where the gains show up
The evaluation covers four KGQA benchmarks and two graph sources. WebQSP, CWQ, and GrailQA use Freebase; QALD10-EN uses Wikidata. Main experiments include GPT-3.5-turbo, GPT-4.1-mini, and DeepSeek-V3.1. GPT-5.4-mini is additionally evaluated on a 500-question constrained CWQ subset.
| Dataset | Questions evaluated | What makes it useful here? |
|---|---|---|
| WebQSP | 1,639 | Mostly 1–2 hops, mostly unconstrained |
| CWQ | 3,520 | 2,266 constrained questions; many multi-hop paths |
| GrailQA | 1,000 | 974 constrained questions, despite mostly single-hop main chains |
| QALD10-EN | 333 | Different graph and diverse compositional constraints |
These are the evaluation counts reported by the paper, not claims about each dataset’s complete size. The authors cannot compute comparable depth/constraint statistics for QALD10 because they report no parseable SPARQL annotations.
Agent searches use beam width k = 3, maximum depth 3 for WebQSP/QALD10/GrailQA and 4 for CWQ, and model temperature 0.01. CCoR is training-free and uses at most five in-context examples. Several tuning/retrieval baseline numbers are imported from original papers; the closest ToG and PoG baselines are also reproduced for the faithfulness analysis.
Answer accuracy: GPT-3.5-turbo
| Method / metric | WebQSP | CWQ | QALD10 | GrailQA |
|---|---|---|---|---|
| ToG · Hits@1 | 76.2 | 58.9 | 50.2 | 68.7 |
| PoG · Hits@1 | 82.0 | 63.2 | — | 76.5 |
| CCoR · Hits@1 | 85.1 | 66.0 | 67.9 | 79.8 |
| CCoR · F1 | 77.9 | 57.5 | 64.9 | 76.1 |
Source: paper Table III; values are percentages. Hits@1 is defined here as at least one predicted answer matching a gold entity; it is not a measure of complete answer-set recovery.
CCoR leads the reported training-free agent comparisons, but does not dominate every supervised baseline. Pangu reports F1 of 79.6 on WebQSP and 81.7 on GrailQA. ELMK reports 60.6 F1 on CWQ, above CCoR’s 57.5, although its Hits@1 of 63.0 is below CCoR’s 66.0. This distinction matters: improvements in “finding at least one answer” do not always mean improvements in the full set.
Constraint-heavy subset: a clearer separation
On 500 randomly sampled CWQ questions with explicit constraints, GPT-4.1-mini CCoR raises Hits@1 from PoG’s 54.2 to 68.4, F1 from 51.6 to 62.3, and KGR from 36.4 to 61.9. With GPT-5.4-mini, CCoR reaches Hits@1 of 70.2, F1 of 65.1, and KGR of 77.3. The stronger-model row is CCoR-only, so it is not a same-backbone comparison against stronger ToG/PoG variants.
Faithfulness comparison: CWQ, GPT-4.1-mini
In this comparison, CCoR’s F1 is 57.8 versus PoG’s 42.2, and Faithful-F1 is 39.9 versus 15.7. DeepSeek-V3.1 shows the same directional pattern: CWQ CCoR has F1 60.3 and KGR 74.2 versus PoG’s 41.4 and 35.8.
Efficiency: fewer calls does not always mean fewer tokens
| Mean LLM calls / question | WebQSP | CWQ | QALD10 |
|---|---|---|---|
| ToG | 7.76 | 19.43 | 15.26 |
| PoG | 7.38 | 19.75 | 11.83 |
| CCoR | 4.51 | 10.20 | 5.51 |
GPT-4.1-mini; paper Figure 4 discussion.
CCoR uses about 59.2 million total tokens on CWQ, compared with 62.3 million for ToG and 113.2 million for PoG. On WebQSP, however, CCoR uses more tokens: 12.2 million versus 11.6 and 11.3 million. Its call savings are consistent; its token savings are workload-dependent. These measurements do not establish end-to-end latency, database execution cost, or a universal dollar-cost advantage.
Ablations: remove components carefully
| Cumulative removal, CWQ / GPT-4.1-mini | Hits@1 | F1 | KGR |
|---|---|---|---|
| Full CCoR | 67.0 | 57.8 | 69.1 |
| Remove constraint chain → CoR with GEF | 60.3 | 52.0 | 49.8 |
| Also remove relation backtracking | 57.2 | 50.0 | 42.6 |
| Also remove GEF | 48.2 | 42.8 | 29.8 |
The cleanest first comparison supports the constraint-chain contribution: +5.8 F1 and +19.3 percentage points KGR over CoR. Later rows remove modules cumulatively, so their drops are not isolated estimates of each component’s effect inside full CCoR.
Depth also matters. Increasing CWQ’s maximum depth from 2 to 4 raises F1 from 43.7 to 57.8. Increasing it to 5 lowers F1 to 53.9 without expanding the paper’s reported question-depth coverage. More exploration is not automatically better.
The paper’s concrete case study
For “What team with fight song Bow Down to Washington did Nate Robinson play for?”, CCoR follows pro_athlete.teams → team_roster.team to eight candidates, then applies fight_song → Bow Down to Washington. It returns the benchmark gold entity Washington Huskies football in six calls. CoT, ToG, and PoG instead return University of Washington; ToG and PoG use 32 and 30 calls. The example illustrates why entity granularity and an explicit final constraint both matter. It demonstrates success on this benchmark item, not that every graph-derived fact is independently verified real-world truth.
How much of the answer came from executable evidence?
The paper assigns a grounding state per question: structured gets weight 1, synthesis gets 0.5, and parametric gets 0. The Knowledge Grounded Rate is the average of those weights.
Faithful-F1 = KGR × F1
KGR is a weighted score—not simply “the percentage of fully grounded answers.” For example, 60% structured plus 40% synthesis yields KGR 80%, although only 60% are fully structured. The 0.5 partial-grounding weight is a design choice, not a calibrated probability.
Metric calculator Hypothetical batch, not paper results
Clamped to the remaining share; the remainder is parametric.
Faithful-F1 multiplies two aggregate metrics. It does not measure the average correctness of each grounded answer. A batch where correct answers are grounded and a batch where incorrect answers are grounded can have the same F1 and KGR. Per-question correctness-by-state reporting would reveal that difference.
Grounding narrows the failure modes; it does not eliminate them
- Missing facts remain missing. Preserving every entity along a selected path cannot recover an absent relation. An unverified nationality should be understood as “not established by this graph,” not necessarily “not American.”
- Relation pruning still loses paths. A top-3 relation beam can omit a necessary predicate. Backtracking revisits retained alternatives, not every relation the beam discarded.
- The LLM can misinterpret the constraint. A wrong source variable, target entity, relation direction, or stopping decision can yield a perfectly executable but wrong query.
- Not every constraint fits a simple chain. The paper explicitly uses GEF for difficult-to-formalize cases, including temporal or comparative constraints without direct graph predicates. Its exposition is clearest for a single unresolved constraint; the results do not establish unrestricted logical expressiveness.
- Graph execution still costs work. Implicit variables reduce the LLM’s exposure to entity lists, not the database’s need to evaluate potentially large joins. The paper leaves reduction of multi-call reasoning costs as future work.
- Cross-paper baselines need caution. Some accuracy comparisons use original-paper results rather than one fully standardized rerun. The reproduced same-backbone faithfulness comparisons offer a more controlled view of the closest alternatives.
Small inconsistencies worth noticing
The paper’s prose describes CCoR as best on CWQ, but Table III gives ELMK a higher CWQ F1 (60.6 versus 57.5); CCoR is higher on Hits@1. Also, WebQSP’s depth and constraint counts in Table II sum to 1,634 rather than the stated 1,639, with the five-question discrepancy unexplained. These do not negate the central experiment, but they argue for reading the numerical tables rather than relying on broad superiority claims.
Closing platform note: For a context graph, this suggests a useful boundary: let language models propose relation paths, let a graph service execute them, and preserve an explicit record of whether the final answer was fully executed, partially synthesized, or recalled.