Natural Language Query Endpoint

Natural Language Query Endpoint

The Queries page (sidebar → Natural Language Query Endpoint → Queries) lets you ask for data from the graph database in plain language, instead of writing SPARQL by hand.

How it works

  1. Type your question in the chat box on the left (e.g. "show me all the generators at plant Frua") and press Send.
  2. The agent looks up the matching ontology classes/properties, writes a SPARQL query, and runs it against GraphDB.
  3. The generated SPARQL query and the resulting table appear on the right as soon as the query succeeds.
  4. If your request is ambiguous (e.g. it's not clear which plant or which asset class you mean), the agent asks a clarifying question in the chat — answer it and the agent continues in the same conversation.
  5. If a query fails, the agent automatically inspects the error and retries with a corrected query — you don't need to do anything.

Things to know

  • Every conversation is saved automatically as you go — the Conversations list in the sidebar shows past conversations, newest first. Click one to reopen it: the full transcript redraws exactly as it looked live, and the agent genuinely remembers everything from before if you keep chatting. Use + New to start a fresh conversation, and the rename/delete icons that appear when you hover a conversation in the list to retitle or remove it.
  • The agent may mention ontology relationships you didn't ask about (e.g. a broader or narrower asset class) when they're relevant to your question — it's worth reading these suggestions, they often help refine what you get back.
  • The SPARQL query shown on the right is exactly what was run against GraphDB — nothing in the table is inferred or summarized by the agent.
  • Every ontology lookup and SPARQL execution the agent performs stays visible as a running entry in the chat (with a checkmark once it completes) instead of disappearing, so you can see exactly what it did to get an answer. When the agent runs more than one SPARQL query in the same turn, only the most recent one is shown by default — click any earlier SPARQL query complete entry to bring that specific query and its results back up.
  • The SPARQL box on the right is always editable — tweak the query directly and press Run to re-execute it, no separate edit mode needed.
  • Use the Export CSV button above the results table to download the currently shown rows.

Charts

The Charts button above the results table opens a full-width chart workspace. It stays disabled until at least one query has run.

  • Pick the source query at the top of the workspace. Every SPARQL query run in the current conversation is listed — the agent's own queries and anything you ran yourself with the Run button — so you can chart an earlier result without scrolling back to it.
  • + Add chart adds a chart. Each chart is configured independently: chart type (bar, line, scatter, histogram), the column on each axis, an optional Series column that splits the data into separate coloured series, and for bar and line charts an aggregation (count, sum, avg, min, max).
  • count is the default aggregation because it works on any column. If you pick a text column as Y with another aggregation, the chart counts rows instead and tells you why — it does not silently draw something meaningless.
  • Histograms offer only numeric columns and let you set the number of bins.
  • PNG downloads the chart as an image, with a solid background matching your current light or dark theme.
  • Each chart shows how many rows it is based on. When the source query carries a LIMIT — the agent usually adds one — a warning badge appears: the chart describes the rows that came back, not the whole graph. Ask the agent to raise or drop the limit if you need the full picture.
  • Charts are working scratch space: they are not saved. Closing the workspace keeps them for as long as the page stays open, but reloading or switching conversations clears them. Export anything you want to keep as PNG.