AxKnowledgeBase_knowledge_graph_read
Run read-only Cypher queries against the knowledge graph to retrieve tabular data of entities, properties, and source papers. Use for comparing metrics or building dataframes by specifying aliased properties and required paper_id.
Instructions
Execute a read-only Cypher query against the knowledge graph and return the rows. Use this when the answer has to be a table of entities and their properties — comparing devices across metrics, building a dataframe, plotting — rather than the prose passages search_knowledge_base returns. Only MATCH/RETURN is permitted. Call get_knowledge_base_schema first to learn the available labels and property names.
Always alias individual properties in the RETURN clause; never return raw node or relationship objects (avoid RETURN n, write RETURN n.name AS name). For relationship queries, alias the source and target as from and to so the result renders as a graph.
Rows carry no provenance of their own, so every query must also return the paper each row came from. Entity, Statement and Passage nodes all carry doc_id, so the source is one index seek away — no need to walk the HAS_PASSAGE/HAS_STATEMENT/HAS_ENTITY chain:
MATCH (e:Entity) WHERE e.name CONTAINS $term
MATCH (p:Document {id: e.doc_id})
RETURN e.name AS name, p.id AS paper_id, p.title AS title
Values returned without a paper_id (or doc_id) column are uncited and must not be presented as sourced results.
The whole result comes back in one response, so keep it small: return only the properties you need, add an explicit LIMIT (100 rows is usually plenty), and never select an embedding_* property or bulk Passage.text — long values are elided from the table, and the query is cheaper written narrowly than trimmed afterwards.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | A read-only Cypher MATCH/RETURN query, aliasing specific properties | |
| params | No | Optional query parameters, for safe value injection |