SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1910.03262 · 2019

Look before you Hop: Conversational Question Answering over Knowledge Graphs Using Judicious Context Expansion

arXiv · PDF · Open in the Atlas

Code that ran

7 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1910.03262.json · badge: /api/ran/1910.03262.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
PhilippChr/CONVEX canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
FunctionStatusWhere it lives
expand_context_with_candidates Ran
ran on a synthesized input
PhilippChr/CONVEX/library/graph_processing.py
code served (permissive licence) · get_code("a050b095f878d0cb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Graph. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import networkx as nx

# Reset the global state
predicate_nodes = {}
qualifier_predicate_nodes = {}

# Create a simple graph context
context = nx.Graph()

# Create sample candidates with statements
candidates = [
    {
        'statement': {
            'entity': {'id': 'entity_1'},
            'object': {'id': 'object_1'},
            'predicate': {'id': 'predicate_1'},
            'qualifiers': [
                {
                    'qualifier_object': {'id': 'qual_obj_1'},
                    'qualifier_predicate': {'id': 'qual_pred_1'}
                }
            ]
        }
    },
    {
        'statement': {
            'entity': {'id': 'entity_2'},
            'object': {'id': 'object_2'},
            'predicate': {'id': 'predicate_2'},
            'qualifiers': []
        }
    }
]

ARGS = {
    'graph': context,
    'candidates': candidates,
    'turn': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Graph — a Graph output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Graph output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
expand_context_with_frontier Ran
ran on a synthesized input
PhilippChr/CONVEX/library/graph_processing.py
code served (permissive licence) · get_code("c8f7e81f1543afe7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import networkx as nx

# Clear the global state
predicate_nodes = {}
qualifier_predicate_nodes = {}

# Create a simple initial context graph
initial_context = nx.Graph()
initial_context.add_node("entity_1", type='entity', turn=0, qa=False)
initial_context.add_node("object_1", type='entity', turn=0, qa=False)

# Create frontier statement without qualifiers
frontier_statement_simple = {
    'entity': {'id': 'entity_2'},
    'object': {'id': 'object_2'},
    'predicate': {'id': 'predicate_1'}
}

# Create frontier statement with qualifiers
frontier_statement_with_qualifiers = {
    'entity': {'id': 'entity_3'},
    'object': {'id': 'object_3'},
    'predicate': {'id': 'predicate_2'},
    'qualifiers': [
        {
            'qualifier_predicate': {'id': 'qual_pred_1'},
            'qualifier_object': {'id': 'qual_obj_1'}
        },
        {
            'qualifier_predicate': {'id': 'qual_pred_2'},
            'qualifier_object': {'id': 'qual_obj_2'}
        }
    ]
}

ARGS = {
    'context': initial_context,
    'frontier': 'predicate_1',
    'frontier_statement': frontier_statement_with_qualifiers,
    'turn': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
expand_context_with_statements Ran
ran on a synthesized input
PhilippChr/CONVEX/library/graph_processing.py
code served (permissive licence) · get_code("fc12a674d6d1c0b0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Graph. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import networkx as nx

# Initialize global dictionaries as they're used in the function
predicate_nodes = {}
qualifier_predicate_nodes = {}

# Create a minimal statement structure that matches what the function expects
def create_statement(entity_id, object_id, predicate_id, qualifiers=None):
    return {
        'entity': {'id': entity_id},
        'object': {'id': object_id},
        'predicate': {'id': predicate_id},
        'qualifiers': qualifiers if qualifiers else []
    }

def create_qualifier_statement(qualifier_predicate_id, qualifier_object_id):
    return {
        'qualifier_predicate': {'id': qualifier_predicate_id},
        'qualifier_object': {'id': qualifier_object_id}
    }

# Build minimal test data
context = None
statements = [
    create_statement(
        entity_id='entity_1',
        object_id='object_1',
        predicate_id='pred_1',
        qualifiers=[
            create_qualifier_statement(
                qualifier_predicate_id='qual_pred_1',
                qualifier_object_id='qual_obj_1'
            )
        ]
    ),
    create_statement(
        entity_id='entity_2',
        object_id='object_2',
        predicate_id='pred_2',
        qualifiers=[]
    )
]

ARGS = {
    'context': context,
    'statements': statements,
    'turn': 1,
    'qa': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
networkx — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Graph — a Graph output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Graph output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_entity_or_literal Ran
ran on a synthesized input
PhilippChr/CONVEX/library/wikidata.py
code served (permissive licence) · get_code("c6f148510f597285")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

entity_pattern = re.compile('^Q[0-9]*$')

def is_entity_or_literal(wd_object):
    if entity_pattern.match(wd_object.strip()):
        return True
    pattern = re.compile('^[A-Za-z0-9]*$')
    if len(wd_object) == 32 and pattern.match(wd_object.strip()):
        return False
    return True

# Test cases for the function
ARGS = {
    'wd_object': 'Q12345'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
is_literal_or_date Ran
ran on a synthesized input
PhilippChr/CONVEX/library/string_conversions.py
code served (permissive licence) · get_code("e551353ebb702dc5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

def is_literal_or_date(answer):
    return not 'www.wikidata.org' in answer

ARGS = {
    'answer': 'literal_value'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_answers Ran
ran on a synthesized input
PhilippChr/CONVEX/library/string_conversions.py
code served (permissive licence) · get_code("5b216a411c982687")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def wikidata_url_to_wikidata_id(url):
    if not url:
        return False
    if is_literal_or_date(url):
        if is_year(url):
            return convert_year_to_timestamp(url)
        if is_date(url):
            return convert_date_to_timestamp(url)
        else:
            return url
    else:
        url_array = url.split('/')
        return url_array[len(url_array) - 1]

def is_literal_or_date(answer):
    return not 'www.wikidata.org' in answer

def convert_month_to_number(month):
    return {'january': '01', 'february': '02', 'march': '03', 'april': '04', 'may': '05', 'june': '06', 'july': '07', 'august': '08', 'september': '09', 'october': '10', 'november': '11', 'december': '12'}[month.lower()]

def convert_date_to_timestamp(date):
    sdate = date.split(' ')
    if len(sdate[0]) < 2:
        sdate[0] = '0' + sdate[0]
    return sdate[2] + '-' + convert_month_to_number(sdate[1]) + '-' + sdate[0] + 'T00:00:00Z'

def convert_year_to_timestamp(year):
    return year + '-01-01T00:00:00Z'

def is_year(year):
    pattern = re.compile('^[0-9][0-9][0-9][0-9]$')
    if not pattern.match(year.strip()):
        return False
    else:
        return True

def is_date(date):
    pattern = re.compile('^[0-9]+ [A-z]+ [0-9][0-9][0-9][0-9]$')
    if not pattern.match(date.strip()):
        return False
    else:
        return True

def parse_answers(answers_string):
    answers = answers_string.split(';')
    return [wikidata_url_to_wikidata_id(answer) for answer in answers]

ARGS = {
    "answers_string": "https://www.wikidata.org/wiki/Q42;1985;15 March 2020;https://www.wikidata.org/wiki/Q100"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
wikidata_url_to_wikidata_id Ran
ran on a synthesized input
PhilippChr/CONVEX/library/string_conversions.py
code served (permissive licence) · get_code("c26e9b6844f1c84b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def is_literal_or_date(answer):
    return not 'www.wikidata.org' in answer

def convert_month_to_number(month):
    return {'january': '01', 'february': '02', 'march': '03', 'april': '04', 'may': '05', 'june': '06', 'july': '07', 'august': '08', 'september': '09', 'october': '10', 'november': '11', 'december': '12'}[month.lower()]

def convert_date_to_timestamp(date):
    sdate = date.split(' ')
    if len(sdate[0]) < 2:
        sdate[0] = '0' + sdate[0]
    return sdate[2] + '-' + convert_month_to_number(sdate[1]) + '-' + sdate[0] + 'T00:00:00Z'

def convert_year_to_timestamp(year):
    return year + '-01-01T00:00:00Z'

def is_year(year):
    pattern = re.compile('^[0-9][0-9][0-9][0-9]$')
    if not pattern.match(year.strip()):
        return False
    else:
        return True

def is_date(date):
    pattern = re.compile('^[0-9]+ [A-z]+ [0-9][0-9][0-9][0-9]$')
    if not pattern.match(date.strip()):
        return False
    else:
        return True

def wikidata_url_to_wikidata_id(url):
    if not url:
        return False
    if is_literal_or_date(url):
        if is_year(url):
            return convert_year_to_timestamp(url)
        if is_date(url):
            return convert_date_to_timestamp(url)
        else:
            return url
    else:
        url_array = url.split('/')
        return url_array[len(url_array) - 1]

ARGS = {
    "url": "1990"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Fact-centric information needs are rarely one-shot; users typically ask follow-up questions to explore a topic. In such a conversational setting, the user's inputs are often incomplete, with entities or predicates left out, and ungrammatical phrases. This poses a huge challenge to question answering (QA) systems that typically rely on cues in full-fledged interrogative sentences. As a solution, we develop CONVEX: an unsupervised method that can answer incomplete questions over a knowledge graph (KG) by maintaining conversation context using entities and predicates seen so far and automatically inferring missing or ambiguous pieces for follow-up questions. The core of our method is a graph exploration algorithm that judiciously expands a frontier to find candidate answers for the current question. To evaluate CONVEX, we release ConvQuestions, a crowdsourced benchmark with 11,200 distinct conversations from five different domains. We show that CONVEX: (i) adds conversational support to any stand-alone QA system, and (ii) outperforms state-of-the-art baselines and question completion strategies.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("1910.03262")
get_code_for_paper("1910.03262")
have("1910.03262")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/1910.03262.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/1910.03262.svg)](https://syntology.ai/paper/1910.03262)

Connect an agent — have() is free.