Profiles and domain vocabulary
A semantic profile tells ShrikeDB how application concepts map to data. It can define names and aliases, graph relationships, aggregate measures, ontology bindings, and the question types the dataset can answer.
For example, a retail profile can map “customer” to a Customer label and “purchase” to a BUYS relationship. A revenue question also needs the correct amount field, currency, and grouping rules. Those meanings cannot be inferred reliably from a column name alone.
Inspect the dataset first
Load a small sample using Import a dataset. Check the labels, predicates, property keys, identifiers, and null values through direct queries. Keep several questions with known answers, including a question that should return no rows.
An MCP client can call semantic_profile_probe to gather bounded schema observations, and semantic_profile_discover to propose a profile. Use the MCP connection workflow to discover these tools and their argument schemas.
Review a draft
Confirm the following before importing a profile:
-
Each concept points to the intended label or RDF class.
-
Each relationship has the correct direction and endpoints.
-
Measures use the intended units and aggregation rules.
-
Time fields have a defined timezone and interval convention.
-
Ontology bindings identify the intended class or property IRIs.
-
Example questions return the expected rows, including empty-result controls.
semantic_domain_pack can assemble a draft from schema observations and domain answers. semantic_profile_validate checks a draft or existing profile against sample questions. Review the diagnostics before importing the profile through the authenticated domain API.
Load a supplied profile pack
If your administrator supplies a reviewed pack, configure its directory before starting the server:
semantic_query:
profile_pack_dirs:
- /etc/shrikedb/profiles/retail
The directory must exist on the server and contain the supplied profile configuration. A pack can include profile.yaml and an optional alignment.yaml. Keep these files with your deployment configuration and backups.
Add ontology grounding
Import the relevant ontology using Import and reason over ontologies. Then review the profile’s mappings between dataset terms and ontology classes or properties. An answer that uses ontology reasoning should include the corresponding grounding or expansion evidence in its result details.
Maintain a profile
Version profiles alongside their sample questions. Draft semantic-alignment changes affect planning only after publication. Compare the profile and alignment hashes in query results when diagnosing a changed interpretation. Revalidate the profile after changing source fields, relationship direction, units, or ontology versions.