# Generic column names in voicebox result set

**URL:** <https://community.stardog.com/t/generic-column-names-in-voicebox-result-set/5514>\
**Category:** Stardog Voicebox\
**Created:** [December 1, 2025, 8:02pm UTC](https://community.stardog.com/t/generic-column-names-in-voicebox-result-set/5514 "2025-12-01T20:02:59Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![R3000](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/r3000/32/358_2.png) [@R3000](https://community.stardog.com/u/R3000)\
**Post date:** [December 1, 2025, 8:02pm UTC](https://community.stardog.com/t/generic-column-names-in-voicebox-result-set/5514/1 "2025-12-01T20:02:59Z")

</div>

Saved query runs just fine but in the `VoicBox` interface it returns columns such as:

- Name
- Name1
- Name2

The select statement in my query is:  
`SELECT ?control ?controlName ?effectivenessScore ?implementationStatus ?asset ?assetName ?exposureValue ?risk ?riskLevel ?nistCode ?nistName`

Any idea how to fix that?

---

<div class="post-metadata">

**Author:** ![Joe\_Fagan](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/joe_fagan/32/1400_2.png) [@Joe\_Fagan](https://community.stardog.com/u/Joe_Fagan)\
**Post date:** [December 1, 2025, 8:20pm UTC](https://community.stardog.com/t/generic-column-names-in-voicebox-result-set/5514/2 "2025-12-01T20:20:10Z")

</div>

Perhaps investigate not explicity querying ?controlName and ?assetName. (If you examine a query built by Explorer Query builder you’ll see that Labels are not explicitly requested in the query by default.)

Explorer and Voicebox make use of Stardog Label service

> **[Label Service](https://docs.stardog.com/query-stardog/label-service#label-service)**
>
> This page presents a SPARQL service to query for labels of entities in the data or look up entities by their labels.

You can add the predicates for ?controlName and ?assetName to the database property label.properties. Then Voicebox will be be inclined to give you the label of returned IRIs.

---

<div class="post-metadata">

**Author:** ![R3000](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/r3000/32/358_2.png) [@R3000](https://community.stardog.com/u/R3000)\
**Post date:** [December 1, 2025, 8:56pm UTC](https://community.stardog.com/t/generic-column-names-in-voicebox-result-set/5514/3 "2025-12-01T20:56:16Z")

</div>

Hm … crafting query in explorer did not help …

Here is the full query if that helps:  
`PREFIX ocm: \<`http://www.w3.org/2019/05/ocm#`\>

SELECT ?control ?controlName ?effectivenessScore ?implementationStatus  
?asset ?assetName ?exposureValue  
?risk ?riskLevel  
?nistCode ?nistName  
WHERE {

# Controls protecting assets

?control a ocm:OpenControlsCapability ;  
ocm:name ?controlName ;  
ocm:effectivenessScore ?effectivenessScore ;  
ocm:implementationStatus ?implementationStatus ;  
ocm:protects ?asset .

# Assets with exposure value

?asset a ocm:BusinessProductAsset ;  
ocm:name ?assetName ;  
ocm:exposureValue ?exposureValue .

# Risks mitigated by controls

OPTIONAL {  
?control ocm:relatedTo ?risk .  
?risk a ocm:Risk ;  
ocm:riskLevel ?riskLevel .  
}

# NIST control mappings

OPTIONAL {  
?control ocm:relatedTo ?nist .  
?nist a ocm:RegulatoryObjective ;  
ocm:framework "NIST" ;  
ocm:code ?nistCode ;  
ocm:name ?nistName .  
}

# Focus on high-value assets and weak controls

FILTER(?exposureValue \> 50000000 && ?effectivenessScore \< 85)  
}  
ORDER BY ?effectivenessScore DESC(?exposureValue)  
LIMIT 25`

---

<div class="post-metadata">

**Author:** ![Joe\_Fagan](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/joe_fagan/32/1400_2.png) [@Joe\_Fagan](https://community.stardog.com/u/Joe_Fagan)\
**Post date:** [December 1, 2025, 9:03pm UTC](https://community.stardog.com/t/generic-column-names-in-voicebox-result-set/5514/4 "2025-12-01T21:03:36Z")

</div>

Perhaps investigate not explicity querying ?controlName and ?assetName. (If you examine a query built by Explorer Query builder you’ll see that Labels are not explicitly requested in the query by default.)

Explorer and Voicebox make use of Stardog Label service

> **[Label Service](https://docs.stardog.com/query-stardog/label-service#label-service)**
>
> This page presents a SPARQL service to query for labels of entities in the data or look up entities by their labels.

You can add the predicates for ?controlName and ?assetName to the database property label.properties. Then Voicebox will be be inclined to give you the label of returned IRIs.

---

<div class="post-metadata">

**Author:** ![Joe\_Fagan](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/joe_fagan/32/1400_2.png) [@Joe\_Fagan](https://community.stardog.com/u/Joe_Fagan)\
**Post date:** [December 1, 2025, 9:11pm UTC](https://community.stardog.com/t/generic-column-names-in-voicebox-result-set/5514/5 "2025-12-01T21:11:20Z")

</div>

Ok - Not suggesting you write all your queries in Explorer (though you can implement OPTIONAL by using OR in query builder) but that you are aware and make use of the label service if appropriate.

Do you have attributes named Name, Name1, Name 2 in the dataset?

---

<div class="post-metadata">

**Author:** ![R3000](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/r3000/32/358_2.png) [@R3000](https://community.stardog.com/u/R3000)\
**Post date:** [December 1, 2025, 9:48pm UTC](https://community.stardog.com/t/generic-column-names-in-voicebox-result-set/5514/6 "2025-12-01T21:48:20Z")

</div>

> [@Joe\_Fagan](#):
>
> r Query builder you’ll see that Labels are not explicitly requested in the query by default.)

No I do not have `Name, Name1, Name2` in my dataset

---

<div class="post-metadata">

**Author:** ![R3000](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/r3000/32/358_2.png) [@R3000](https://community.stardog.com/u/R3000)\
**Post date:** [December 2, 2025, 6:43pm UTC](https://community.stardog.com/t/generic-column-names-in-voicebox-result-set/5514/7 "2025-12-02T18:43:44Z")

</div>

followed service label suggestons and and still - `Name` instead of `Control Name` is used ☹  
what else can i do?

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/f/fc2dc7a093e0e3aafc061d5a9750946124a72eac.png)  
and the label property looks like that:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/d/d9dc49a43ce3fe44148d75e4c22002b73cbf90f8.png)

---

<div class="post-metadata">

**Author:** ![mike](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/mike/32/14_2.png) [@mike](https://community.stardog.com/u/mike)\
**Post date:** [December 2, 2025, 7:56pm UTC](https://community.stardog.com/t/generic-column-names-in-voicebox-result-set/5514/8 "2025-12-02T19:56:03Z")

</div>

We make no guarantees about consistency of names used for variables in generated queries. There’s no reason for them to be the same between invocations, they have no semantics; the two versions of your query, one using ?name and the other using ?controlName are isomorphic.

If you want control over how result sets are displayed you should build a custom application that reflects the UX you are after. Our MCP and Langchain integrations make this easy.

---

<div class="post-metadata">

**Author:** ![R3000](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/r3000/32/358_2.png) [@R3000](https://community.stardog.com/u/R3000)\
**Post date:** [December 2, 2025, 10:26pm UTC](https://community.stardog.com/t/generic-column-names-in-voicebox-result-set/5514/9 "2025-12-02T22:26:58Z")

</div>

Mike,

Thanks for your reply. So, you are saying that no matter how I tweak the saved queries voicebox will make it’s own mind how to name the variables in the generated queries, right?

MCP server wrapper around a Stardog knowledge graph is a good idea, indeed. I see that you will be presenting it on December 11 [Building a Semantic Layer with MCP and LangChain for Agentic AI](https://info.stardog.com/building-a-semantic-layer-with-mcp-and-langchain-for-agenticai) - looking forward to it.

Meanwhile I see an 8 months old repo [GitHub - noahgorstein/mcp-server-stardog: A Model Context Protocol (MCP) Server for interacting with a Stardog Knowledge Graph.](https://github.com/noahgorstein/mcp-server-stardog) and it is is using `stdio` protocol - I believe that is when stardog mcp server and mcp client are collocated. In my case it is a cloud instance. It makes more sense to use `http_streamable` in this case. Not sure if that is supported. Or am I missing something?

---

<div class="post-metadata">

**Author:** ![R3000](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/r3000/32/358_2.png) [@R3000](https://community.stardog.com/u/R3000)\
**Post date:** [December 4, 2025, 4:52pm UTC](https://community.stardog.com/t/generic-column-names-in-voicebox-result-set/5514/10 "2025-12-04T16:52:11Z")

</div>

Any updates on this thread above?

Also some strange behavior now. I have changed the order of the columns in the saved query - but the Voicbox refuses to update. What can be done?

---

<div class="post-metadata">

**Author:** ![mike](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/mike/32/14_2.png) [@mike](https://community.stardog.com/u/mike)\
**Post date:** [December 4, 2025, 7:24pm UTC](https://community.stardog.com/t/generic-column-names-in-voicebox-result-set/5514/11 "2025-12-04T19:24:54Z")

</div>

Correct, it will use whatever variable names it deems appropriate. Same with the ordering of the variables in a projection, that holds no semantics whatsoever, so the agent is free to order them arbitrarily.

Yes our MCP server will support a remote setup.
