Natural language interface
Feature: Natural language queries on marketing asset data
In order to quickly gain insights from marketing campaigns and asset processing data
As a marketing operations analyst
I want to use natural language questions to query the RDF triple store and get results in a readable format
Scenario: Retrieve campaigns using HD video assets for a specific audience in a given year
Given an RDF triple store is populated with marketing campaign data and video asset data
And RDFS and SKOS definitions for the marketing domain (covering campaigns, assets, and audiences) are loaded
And a domain-tuned language model is configured to convert natural language queries into SPARQL
And the triple store includes both the core marketing dataset and an additional asset metadata dataset
When I ask "Which campaigns targeting Millennials in 2024 used HD video assets?"
Then the system should translate the question into a SPARQL query guided by the domain's RDFS ontology and SKOS vocabularies
And the query should incorporate data from both the core campaign dataset and the asset metadata dataset to find the relevant results
And the system executes the SPARQL query against the triple store
And I should see the query results in a human-readable table format
And the results table should look like:
| Campaign Name | Video Asset | Audience Segment | Year |
| Spring Sale 2024 | spring_sale_hd.mp4 | Millennials | 2024 |
| Summer Launch 2024 | summer_launch_hd.mp4 | Millennials | 2024 |
@startuml
actor User
participant "Natural Language UI" as UI
participant "LLM-based Query Converter" as LLM
participant "Ontology Manager\n(RDFS + SKOS)" as Ontology
participant "SPARQL Query Builder"
participant "RDF Triple Store"
participant "Result Formatter"
== Natural Language Query ==
User -> UI: Input NL query\n"Which campaigns targeting Millennials in 2024 used HD video assets?"
UI -> LLM: Send NL query
LLM -> Ontology: Fetch relevant schema & vocab\n(RDFS + SKOS)
Ontology --> LLM: Return ontological context
LLM -> "SPARQL Query Builder": Send parsed intent + structure
"SPARQL Query Builder" -> Ontology: Validate structure against schema
Ontology --> "SPARQL Query Builder": Confirm shape & constraints
"SPARQL Query Builder" -> "RDF Triple Store": Execute SPARQL query
"RDF Triple Store" --> "SPARQL Query Builder": Return raw results
"SPARQL Query Builder" -> "Result Formatter": Convert results to table
"Result Formatter" -> UI: Display results table
UI -> User: Show formatted results
@enduml
https://northellpartners.slack.com/files/U0480TGMMRS/F08FY56KMCG/byod_feature_outline.pdf
https://northellpartners.slack.com/files/U0480TGMMRS/F08D3G48AAX/benefits_of_the_rdf_data_model.pdf
https://northellpartners.slack.com/files/U0480TGMMRS/F08L0UTGVFA/byod_ads.pdf