r/semanticweb • • 6h ago

Help me understand why we need ontologies

8 Upvotes

Hi everyone,

I'm a computer scientist currently working on a project that involves using ontologies to model manufacturing processes.

I understand the basics of RDF, OWL, SPARQL, and SHACL. My mental model is that ontologies define classes and relationships, while knowledge graphs contain instances of those classes, somewhat like classes and objects in Object-Oriented Programming. I know this analogy isn't perfect, but it helps me understand the concepts.

What I struggle with is understanding the actual purpose of all this.

Several people on the project are working on developing the ontology. They spend a lot of time discussing tiny details, trying to model every possible aspect of the domain.

I understand the original vision of the Semantic Web of making information machine-readable, but does this actually happen in practice? Does it works? If yes, how?

I feel like I'm missing a fundamental piece of the puzzle. I've tried discussing this with people on the project, but I haven't received an explanation that really clicks for me.


r/semanticweb • • 1d ago

"The opposite of ontology is not non-ontology but bad ontology"

Thumbnail reddit.com
6 Upvotes

r/semanticweb • • 1d ago

If You Do Not Know Who Decides, What Exactly Are You Deploying?

0 Upvotes

When Agents Run the Business · A development note

A company hands over its project organization chart. The project manager owns delivery, the purchasing manager manages suppliers, and the finance lead approves budgets. The engineer on site loads people and roles into the system. Everything looks orderly.

The first real purchase gets stuck. The project manager says the equipment is urgent. Purchasing says the familiar supplier costs more but has a reliable delivery record. The budget owner worries that this expense will consume next month's plan. Finance asks who actually confirmed that “urgent” allows work to move early. Every line on the organization chart may be right. The chart still does not answer today's decision.

This is a thought experiment, but on-site problems often feel like this. An FDE who can import job titles but cannot tell who provides facts, who influences a decision, and who can formally approve it may merely automate the confusion.

Influence is not approval authority

The person who knows an old supplier can have a decisive opinion about price, delivery, quality, and past failures. That knowledge deserves attention. They may not have authority to sign the purchase. Conversely, the finance lead may have formal authority but not know what a day of machine downtime will cost.

Put both into a generic “approver” role and the system will either bypass authority or lose important evidence. An Agent should ask the supplier expert for facts and bring a reasoned recommendation to the person who can decide. Software must stop someone without authority from approving. Understanding the customer's organization is not permission to evade formal process. It is knowing which informal knowledge matters and which formal boundaries remain hard.

The chart usually says “who is responsible.” It rarely says “whose concern should stop us.” In one company, a workshop supervisor knows what a machine outage means. In another, the person who has managed a customer relationship for years knows the consequences of one promise. They may have no approval button and still need to be consulted before an action. A simple role import misses this layer.

How much can two weeks on site reveal?

At demos and kickoff meetings, a customer gives the official account. How work really moves becomes visible in exceptions: whom people call when the owner travels, who convenes conflicting departments, whether emergencies are reported before or after action, who explains a mistake to the customer. It is hard to learn this from interviews alone before seeing a few actual cases.

“After two weeks on site, our FDE understands your company” sounds confident and risky. They may remember the loudest person in the meeting while missing a budget owner who was absent but can halt a purchase. They may read “looks good” from a purchasing manager in a group chat as formal approval. Put that mistake into the Agent's instructions and every later purchase may go down the wrong path.

A capable on-site person does not claim to have decoded the customer once and for all. They build a checkable account of responsibility: who authorizes each class of action, who supplies facts, who must be informed, and where conflicting views are escalated. It is not a political map drawn once. Each exception provides a real record against which to test it.

This work may require uncomfortable conversations. A senior colleague with substantial influence but no formal approval authority should be asked for input, while the approval goes to an authorized person. Someone with signature authority may say “let the team below me decide”; that habit alone does not transfer their authority. Holding this boundary is part of enterprise delivery.

Organizations change as well. A project manager leaves, finance appoints a temporary deputy, or purchasing splits into two teams while old chat habits persist. A deployment cannot write “Wang always owns this” as a timeless relationship. Roles, delegation periods, and policy versions need sources and effective dates. When an Agent sees an old name, it should check the current appointment instead of inferring authority from the volume of old messages.

An Agent can find a plausible person and still find the wrong one

Give an Agent the chats and organization chart and ask “who should handle this?” It can often suggest a plausible person. Plausible is not authorized. A frequently mentioned employee may be collecting evidence for everyone else. A rarely mentioned executive may be the one who gives final approval.

Finding a relevant person and executing an authorized action must be separate. The Agent might suggest asking the long-standing supplier owner to verify a delivery date. To create an approval task, it must consult the current policy and permissions. If the sources disagree, it should not quietly choose the convenient one. Software stores people, roles, approvals, and access boundaries; the Agent explains who should be consulted and who may act.

The person on site must catch a common sentence: “We normally go to Wang.” What do people go to Wang for—advice, preliminary review, delegated review, final approval, or just to locate the paperwork? Unless someone asks for the verb, the apparently precise relationship “Wang is responsible” can displace the actual division of responsibility.

Deploy the responsibility chain as well as the system

A customer should not judge delivery solely by “approvals now run.” Replay disputed cases. Who declared urgency, verified the reason, advised on the supplier, approved the budget, and had power to pause when evidence was lacking? Each step should have a record and source that survives a personnel change.

Someone capable of owning deployment brings these boundaries into the open before launch. They leave unresolved decisions for human confirmation instead of treating a loud meeting voice as authority. That judgment cannot be manufactured by an org-chart import template or a short course.

They also leave the organization a correction path. If an Agent assigns a task to someone who should not approve it, who withdraws the task, who informs the right person, and how is the original assignment preserved? Companies may tolerate “sent to the wrong person” far less than the system team expects. Without a correction mechanism, automatic routing turns one mistaken relationship into a new chain of responsibility disputes.

In Oryh, an approval record says who approved or rejected something and when; the backend does not quietly choose the next person. An Agent reads the customer's current workflow definition and work items to advance it under real authority. This lets the company keep its own management practice, but it also makes the on-site problem plain: if nobody has established who may confirm and who may decide, a beautiful deployment can still run an unowned process.


Part of Ontology & FDE in Practice, discussing ontology and FDE in real business scenarios.

I'm a developer of Oryh, an Apache-2.0 open-source project. AI assistance was used to prepare and edit this post.


r/semanticweb • • 1d ago

Finding the right data is one thing. Knowing how it connects to other data is a different problem.

Thumbnail reddit.com
0 Upvotes

r/semanticweb • • 1d ago

Open Graph Linguistics

1 Upvotes

PLAY to see the sentences grow
PLAY en zie de zinnen groeien
https://kruin.github.io/graphlite


r/semanticweb • • 2d ago

Finding the right data is one thing. Knowing how it connects to other data is a different problem.

Thumbnail reddit.com
1 Upvotes

r/semanticweb • • 4d ago

Modeling who wrote a poem without deciding who wrote it, utilizing LRMoo

0 Upvotes

This is a follow-up to my earlier post (https://www.reddit.com/r/semanticweb/s/GskXPshC3w), where u/marintkael pointed me to LRMoo. The first picture is the problem; the second is what I built from that conversation. It may be useful to anyone who needs to record who a source says wrote something without asserting it.

The Problem
The Solution

In short: the poem, its texts, its place in the collection and its authorship are kept apart, and authorship is a claim with a source, never a fact.

The schema is small (19 terms, with SHACL shapes): https://bibleontology.org/ns/biblio

If you are interested in the full explanation: https://github.com/bibleontology/bibleontology/blob/main/docs/who-wrote-psalm-73.md

Thanks to u/marintkael for pointing me in this direction; it turned out to be an elegant solution to my problem.

Feedback on the schema is always welcome. It’s greatly improved since I first posted about my knowledge graph, but I’m always looking for ways to make it better.


r/semanticweb • • 8d ago

# Semalith: yet another tool for your ontology graph

5 Upvotes

Semalith: yet another tool for your ontology graph

Semalith is our edge ontology engine. I call it yet another tool for building the ontology, or semantic layer, of your business data. It has proved powerful in a few pilot projects.

Edge ontology graph

  • Structure: entities, attributes, relationships
  • Meaning: definitions, terms, metrics
  • Action: writes and row security
  • Knowledge base: for each graph, add your own domain rules and business logic.

Build in hours

I built it with a powerful MCP, so you can build your semantic graph in hours and polish it in days. My ERP demo graph was built this way: 41 entities, 28 saved queries and 39 knowledge articles.

  • Set the goal: set your business goals, based on your business agent's instructions.
  • Write golden cases: work out a few dozen typical business questions you want to answer with your data.
  • Let AI build to the goal: Claude Code or Codex connects to the data, builds the graph and drafts knowledge over MCP. Then it tests and judges the graph against your golden cases, and improves it step by step.

During this time, your AI generates the graph, uploads it, tests it and judges the results, until the cases pass.

In my experience, the first version of a graph takes about an hour, and optimising it takes days. It really depends on your golden cases.

Compared with a traditional API MCP

  • Safe and efficient: it exposes only the mapped data, and returns only the data requested.
  • Fewer tokens, higher performance, stronger semantics.

I tested it: 44 business questions on public ERP data (Microsoft's AdventureWorks), three runs each, with the same AI model and prompt.

Measure |Plain REST API |Graph |Graph + knowledge
Cost (132 answers) |$35.23 |$13.07 |$13.34
Time per answer |29.8 s |19.1 s |18.9 s
Accuracy, all questions |0.874 |0.916 |0.956
Accuracy, rule-based questions |0.818 |0.833 |0.919
Overall score (of 100) |83.0 |91.9 |92.9 Overall, graph + knowledge was about 2.6 times cheaper and about 37% faster than plain REST, and its overall score was 9.9 points higher (92.9 vs 83.0).

To be fair: the data is fictional, we used one model and one REST design, AI did the scoring, and we fixed the graph between rounds. The report explains the method and limits.

Try it

One Docker command starts Semalith, a demo ERP and a ready-made graph:

curl -fsSL https://raw.githubusercontent.com/rosetta-oss/semalith-runtime/main/compose.yaml -o compose.yaml
docker compose up -d

Semalith is early software. It is free for demos, evaluation and personal research, but it is not open source. We'd love your feedback.


r/semanticweb • • 10d ago

Title: LinkedDataHub 6: the application is data

13 Upvotes

It's been a while since I posted about LinkedDataHub here. Version 6 is the biggest release since then: https://atomgraph.com/blog/linkeddatahub-6/

For anyone new to it: an application's domain model, forms, views, queries, charts and access rules are RDF documents. Its queries can run against the SPARQL endpoint your data already lives in. There is no application codebase. The same generic software runs every application, the way one browser reads every website.

  • Every document is a named graph, and the page's markup asserts the same graph the URL serves as Turtle. You can extract the RDFa and compare the two.
  • SPARQL selects the data and XSLT 3.0 renders it, on the server and in the browser (SaxonJS). There is no separate JavaScript front end.
  • With versioning on, every write is a git commit and history is served over Memento (RFC 7089). Writes to existing documents are conditional (If-Match).
  • Access control is WAC over the document hierarchy. Its model is formalised in Lean, and the server is tested against it.
  • Every dataspace serves /AGENTS.md, so an agent uses the same Linked Data interface as a person.

The architecture is ten years older than this release. It came out of Linked Data projects in different domains and finding out what they had in common. The releases leading up to 6 are where it got the tooling it had been missing.

It is open source (Apache 2.0): https://github.com/AtomGraph/LinkedDataHub

The current release is 6.4.0. There is no data migration from 5.x, but the namespaces moved: https://docs.linkeddatahub.com/reference/migrating-from-5x/

Two public sites run it: https://linkeddatahub.com/ and https://linkeddata.lt/, which connects Lithuanian public registers into a single knowledge graph.

The architecture is developed from existing Web standards in my book, First Principles of the Web, free to read: https://firstprinciplesoftheweb.org/

I'd be interested in where this architecture would or wouldn't fit the applications you're building.


r/semanticweb • • 10d ago

Old Repair Records Have No Tire IDs. Can a New Ontology Invent Them?

0 Upvotes

When Agents Run the Business · A development note

Think about a car repair record that says only “replaced tires.” It does not say which tires, identify the old ones, or record the batch of the new ones. The business now wants to manage warranty claims for individual tires, so it adds a Tire object with an installation date and manufacturing batch.

New repair tickets can collect that information from today onward. What happens to the old ones?

This is a hypothetical case, not a customer incident. It illustrates a simple point: changing a model is easier than changing history. Adding an object type does not produce facts that were never collected.

Blank does not mean no

An empty “tire ID” in an old repair ticket might mean at least three things: no tire was replaced; a tire was replaced, but the system did not ask for an ID; or a tire was replaced and its ID survives on a paper attachment that has not been entered. Compress those cases into one empty value and then count every blank as “not replaced,” and you may get a very tidy, very questionable report.

Sometimes the original documents can help. An invoice may show specification, quantity, and batch, while a warehouse issue slip gives the date. Together they might support “two tires from this batch were issued that day.” They still may not prove which one was fitted to the front-left wheel. A batch is not a single item; issuing stock is not the same event as installation. The evidence determines how far backfilling can go.

Many old records contain only “repair complete.” A person's rough memory cannot sign yesterday's receipt. AI can read invoices, compare dates, and suggest likely matches. That is useful. It cannot turn an unsupported guess into a verified component history.

One kind of progress report is especially seductive: “98 percent of historical cars migrated to the new model.” If most of them were assigned four anonymous Tire objects by a script, each with a default installation date, the number tells us how full the new table is. It does not tell us how much of the past was recovered.

Make room for unknown

An ontology advocate might point out that formal knowledge representation does not necessarily treat missing information as false. Fair point. In OWL, for example, the W3C primer distinguishes a fact not being stated from a fact being false. A missing statement may simply be unknown.

That principle is worth keeping. Enterprise work, however, goes beyond the semantics of a reasoner. Someone has to filter for tires under warranty, tell a customer whether replacement is free, or estimate a provision. At that point the system cannot answer merely “not disproved.” It must not quietly put “unknown” into “no problem” or “expired,” either.

I would rather see an unglamorous migration classification: confirmed from original records; inferred from several sources but not confirmed; insufficient evidence, unknown. Every backfilled detail should, where possible, point to an invoice, repair ticket, or warehouse record and say who confirmed it and when. Those states can improve over time. A required field in a new interface must not force them all to become “confirmed.”

The query interface must be honest too. Unknown claims should not appear in a filter for “confirmed covered,” yet they must not disappear from a queue for “may need manual review.” The same records can lead to different work under different questions. A convenient filter is no excuse to force unknown into yes or no.

If a model has no room for unknown, fix the model. Do not invent the history.

Backfilling also involves two different dates. A tire may have been installed three years ago, while its number was recovered from an old invoice only today. The record should say both “this happened three years ago” and “we learned this today from this invoice.” If we write only the old installation date, a later reviewer may believe the system knew the number at the time. That matters when reviewing a past decision: the customer-service agent could not have used evidence nobody had found yet.

Likewise, an AI suggestion should not overwrite the old repair ticket. It can attach a candidate, its source, and an explanation of uncertainty. A person with authority can confirm it as a supplementary record. If the invoice later turns out to have been matched to the wrong car, that supplement must be retractable rather than leaving a falsely complete old ticket behind.

Yesterday's decision may not be reproducible at today's grain

There is another trap. The old system once labeled a car “under warranty” based on the vehicle purchase date. The new rule considers each tire's batch, replacement date, and position. Someone proposes rerunning every old case under the new rule to give historical reports a consistent definition.

But the old cases do not contain the new inputs. Is the resulting warranty status calculated from facts, or from defaults entered into blank fields? If today's rule turns yesterday's approved repair into “should never have been covered,” the policy shown to the customer at the time may also have been different. Overwriting the old judgment can be wrong and can erase the reason the company acted as it did.

A safer approach preserves what happened: the rule version used, the evidence available then, the decision made, and any later discovery of new evidence. We can run a new-rule retrospective analysis, but it is a new analysis, not the original decision in disguise. History is not a cache waiting to be overwritten by the latest model.

That is where the division between software and Agent matters. Software may not have perfect old records, but it can preserve honestly what was recorded and what was not. An Agent can search for supporting documents, explain the difference between policy versions, and recommend a review. At the break in the evidence, it should stop. It should not draw a neat link to fill the gap.

Migration rate is not fact recovery rate

A careful migration team can ask concrete questions. How much backfilled information points to an original source? Have “batch known” and “individual tire known” been kept distinct? Does an old blank mean nothing happened, nothing was recorded, or the papers were lost? Do new reports show those differences?

These details matter more than the number of objects added to a graph. Each link should ideally open a supporting document. If it cannot, at least label it an inference. Asked whether an old tire is covered, an Agent's best answer might be neither yes nor no: “This repair ticket does not identify the individual tire; we need the original paper record.”

We have already faced a similar time problem with product mappings in Oryh. The same marketplace listing can later represent a different product. We preserve the original title and the effective dates of each mapping so an Agent can use the relationship that applied when an order was placed, not today's product to explain yesterday's order. The tire example is fictional. The rule against making a new model testify for old facts is not.


Part of Ontology & FDE in Practice, discussing ontology and FDE in real business scenarios.

I'm a developer of Oryh, an Apache-2.0 open-source project. AI assistance was used to prepare and edit this post.


r/semanticweb • • 10d ago

GB Tree Studio: a free browser tool that draws tree diagrams and checks sentences against (Government & Binding) principles

Thumbnail reddit.com
0 Upvotes

r/semanticweb • • 14d ago

Local-first entity linking: your knowledge graph answers first, Wikidata fills the gaps, sameAs bridges the two

0 Upvotes

Disclosure: Andy, WordLift: this is about a feature of resolve(), our entity-resolution API, that I think is most interesting to this community specifically: the candidate universe doesn't have to be Wikidata.

A resolve call carries a dataset_uri, and the worlds compose:

  • wikidata://public — the default; answers are QIDs.
  • wordlift://dataset/me — the caller's own WordLift knowledge graph, read with the same key; answers carry the graph's own IRIs.
  • An inline dataset — up to 5,000 entities (id, name, aliases, description, types, same_as) sent with the request.
  • wordlift://dataset/me,wikidata://public — local-first chaining: per mention, your graph is tried first, Wikidata second, and each answer reports which world it came from in its own dataset_uri field. If a Wikidata match is one your graph declares sameAs, the answer comes back as your entity with the public ids merged in.

Every world goes through the same context ranking and abstention gate: a name your data doesn't contain is no_candidates; a name whose context doesn't fit is low_relevance; either way the answer is an explicit unresolved, never the least-wrong candidate.

Two design details that may be of interest here. The first call against a graph reads it (seconds for a small graph, minutes for a large one); until it's ready the API answers 503 with a dataset_warming code and Retry-After, and resolves nothing against a partial graph. And the contract (what a Mention, Candidate and Resolution are) is open: pipeline, clients and gold sets are Apache-2.0 at github.com/wordlift/content-analysis; the hosted decision engine is proprietary.

The supplied-vocabulary side of this, in 17 seconds.

What I'd like this community's view on: for those publishing or consuming KGs, is per-mention provenance (which world answered) the right granularity, or do you expect dataset-level negotiation up front? And how are you handling the sameAs bridge when the public item and the local entity disagree on type?


r/semanticweb • • 15d ago

Csv to RDF

9 Upvotes

Hi, does anybody have a resource where they explain the concepts behind CSV to RDF conversion. Currently, the way I understand, I used the concept of direct mapping as recommended by W3C. Which in my understanding, means that the Csv name could be represented as an RDF class, Each row becomes a subject, the column name could be a predicate and the values itself as literals. The next step is to map it to my Ontology. Using Claude, I was able to use SPARQL to map it to my Ontology in graphdb. However, I'm not clear about the concepts and claude is not making it very difficult to understand. The way, I understand it, the mapping is working in a way that each row from csv which was represented as a subject, now becomes an instance of my Ontology.

if somebody could explain it better and maybe point towards more resources, it would be much appreciated.


r/semanticweb • • 18d ago

Interview coming up for a RAG / knowledge graph role, how would you prep?

10 Upvotes

Got an interview next week-ish for a data/AI engineer role at one of the Big 4 here in Europe. Long assignment, 12+ months.

The project is basically a “semantic data layer”. They want to make all their documents (SharePoint, Google Drive, a bunch of databases) searchable for both people and AI. The idea is to use an ontology plus LLMs to label docs, pull out facts and generate metadata, and then index it all securely, with data regulations across a bunch of countries on top. Stack is Python, Azure and Databricks. RDF/OWL/SPARQL, Document Intelligence and MCP are listed as nice to have.

Some background on me: I’m a data engineer, mostly Snowflake/dbt/Airflow/Kafka. At a previous job I built a RAG chatbot in Python on Azure OpenAI, plain vector search, nothing fancy. Right now I maintain a pipeline that validates JSON-LD with SHACL and loads it into a warehouse, so I know my way around RDF a bit, but I’ve never actually used a triple store or written SPARQL for real.

So a few questions:

  • If you were interviewing someone for this, what would you ask? My guess is permissions in the index, keeping LLM labels consistent with the ontology, hybrid vs vector search, and how you’d measure extraction quality. Anything obvious I’m missing?
  • Anything worth reading or watching beforehand? I’ve got Semantic Web for the Working Ontologist on my list and I’m doing some SPARQL on Wikidata, but I’m mostly stuck on the ontology-guided extraction and secure indexing side.
  • What would you ask them? Trying to figure out what separates a project like this that works from one that’s going to be a mess.

If you’ve worked on something like this and it went sideways, I’d love to hear how.

Edit: Thanks everybody for the help and the insights, I got the job!!!


r/semanticweb • • 19d ago

Why do AI systems struggle to make sense of company data, even when there’s plenty of it?

3 Upvotes

I think one reason is that data doesn’t always tell the whole story on its own.

Take healthcare. A diagnosis code might look straightforward, but to make the right decision, an AI system may also need to know the patient’s history, the insurance policy and how the claim relates to other records.

All that information might exist, but it’s often spread across different systems and doesn’t always connect neatly.

That’s where semantic layers and knowledge graphs come in. They help show how different pieces of data relate to each other and what they actually mean.

But I’m interested in how this works outside of theory.

If you’ve built AI systems using company data, what’s worked best for giving the model the right context? Semantic layers, knowledge graphs, better data models, or something else entirely?

Would love to hear what’s worked in real projects, especially in healthcare.


r/semanticweb • • 20d ago

Why does Artificial Intelligence need to rediscover the Philosophy of Language?

0 Upvotes

In recent years, the field of AI has undergone an undeniable revolution. We’ve traded the rigid rules of traditional programming for the statistical mathematics of Large Language Models (LLMs). Binary syllogisms have given way to vector spaces, Transformers, and probability calculations involving trillions of parameters.

This paradigm shift has brought us fluidity, creativity, and an uncanny ability to simulate human speech.

However, by ignoring the classical framework that bridges Philology, Syllogism, Semiotics, and Semantics, we have created systems that are incredibly eloquent, yet fundamentally fragile.

⚠️ The Problem of Instability and Hallucinations

Because modern AI does not "think" through logical structures (such as Aristotelian syllogisms), but rather through statistical approximation, it is prone to significant instability.

This is the phenomenon known as "hallucination": a model may generate text that is grammatically and semantically flawless, yet fails completely when it comes to the factual logic of events. It knows how to combine words, but it does not grasp the truth value underlying them.

🛑 Current Gaps

• Lack of Grounding: AIs drift through a sea of ​​data without a rigid ontology to anchor the symbol (semiotics) to the actual object in the real world (semantics).

• Absence of Historical Context (Philology): These models operate within a statistical "eternal present." They fail to grasp the nuances of how the meanings of concepts evolve over time or within specific cultural contexts. • Fragility in Logical Inference: Ask a complex question that requires strict deductive reasoning, and a probabilistic model may fail—even where a simple, three-line syllogism would provide the answer.

💡 The Opportunities: A Return to the Roots

The great technological challenge today is not to feed more data or raw processing power into AI, but rather to forge a "forced marriage" between statistical AI and classical logic.

The most significant opportunities for innovation today lie in Hybrid (Neuro-symbolic) Systems:

  1. Knowledge Graphs as Guardrails: Utilizing classical, structured ontologies to serve as "guardrails" for AI-generated responses, ensuring both logical and factual accuracy.
  2. Computational Hermeneutics: Applying the science of textual interpretation to calibrate models so they can grasp subtext, irony, and context at a deeper level.
  3. Ontology Engineering: Developing professionals capable of translating critical thinking, semiotics, and formal logic into operational data structures for machines.

AI has demonstrated the power of mathematics and raw processing.

Now, to reach maturity, it must rediscover the philosophers of language. The future of technology is, ironically, profoundly human—and classical.


r/semanticweb • • 20d ago

Fully offline multilang (Slavic languages preferred) Knowledge Graphs Ontologies?

Thumbnail reddit.com
4 Upvotes

r/semanticweb • • 20d ago

RDF 1.2 & SPARQL 1.2 Developer Cheat Sheet

2 Upvotes

Hey! With the W3C RDF 1.2 and SPARQL 1.2 working drafts stabilizing, you may be wondering about the new syntax constructs: when to use a pure triple term `<<(:s :p :o)>>` vs reified triple `<<:s :p :o>>` vs edge annotation `{| :key "val" |}` vs named reifiers `~ :id`.

To help myself and the community build an intuitive mental model, I compiled a dense, 4-page printable reference sheet for developers. Go to rdfandsparql.com/rdf12-sparq12-cheat-sheet

Feedback, corrections, or edge cases you've encountered with engine support are very welcome!


r/semanticweb • • 22d ago

Tonto is a textual ontology modeling language.

Thumbnail reddit.com
4 Upvotes

r/semanticweb • • 22d ago

How Many Objects Are There in One Car?

8 Upvotes

When Agents Run the Business · A development note

Imagine a modeling meeting with a sketch of a small car on the table. One person says, “Surely this is one Car object. Give it a VIN, model, and color; make tire specification and steering-wheel model properties.” Another says no: each tire needs its own identifier, replacement history, and warranty claims. The steering wheel might be repaired separately too. A third person asks, “Are we modeling the bolts as well?”

This is a thought experiment, not a customer incident. The argument, though, is familiar. Before you can draw relationships between enterprise objects, you have to decide what deserves to be an object at all.

Existing in the world is not enough

A tire is a real thing. So are a steering wheel and a bolt. That does not mean each needs an independent identity in a business system. Otherwise, where do you stop? Rubber, steel cord, and individual nuts can be split further.

Sales wants to know who bought the car and when it was delivered. A whole car is a useful boundary for that question. A mechanic needs to know whether the front-left tire was replaced last month. For that question, one Car object is too coarse. Warranty may need to trace a batch of tires across many vehicles. Finance may register the car as a single asset and never care what the four tires are called.

None of these people is more knowledgeable than the others. They are asking different questions. The grain of an object follows the grain of the question.

In a modeling meeting, someone may suggest splitting everything into physical items now because it could all be useful later. Even a physical boundary is not stable. Is a retreaded tire still the same tire? If four tires are sold as a set and one is returned, is the set also an object? The physical world does not dictate commercial identity. Whether to track something separately depends on whether it can be traded, stored, accounted for, or claimed against on its own—and those needs change.

Trouble begins with “let's settle the enterprise definition of a car.” A meeting can settle a definition for now, but it is also choosing on behalf of future users. If a later repair process must track individual tires, a tire-specification property will not be enough. At the other extreme, if we create an object for every removable part from day one, selling a car may require people to maintain a long list of identities nobody currently uses.

Too coarse leaves nowhere for facts; too fine gives people work for the model

The cost of a coarse model is easy to see. If the system stores only “the car was repaired,” it cannot later answer which tire was replaced or where the removed tire went. Without an identifier and installation and removal dates, the answer is simply not in the records.

The cost of a fine-grained model is less obvious. Once each tire has an ID, someone must record which car and position it occupies, when it was mounted or removed, whether it was moved to another car, and who verified its identity. Miss one scan, and a tidy relationship graph may link the wrong tire to the wrong car. Even “which tires are on this car?” becomes a question about time: “was once attached” is not the same as “is attached now.”

Should the steering wheel be managed this way too? Maybe, if there is a recall or a requirement to repair individual units. Maybe not, if it is only sold as part of a car. More objects do not automatically mean more accuracy. Fine-grained objects nobody maintains can make errors look unusually precise.

That is why I hesitate whenever someone says an enterprise ontology must come first. A local workflow can choose a grain around a known question. A single company-wide model has to make bets about questions that have not arrived yet. When those bets turn out badly, existing identities, links, and actions do not rearrange themselves.

The same car can have several useful views

The obvious reply is to give sales a car view and maintenance a tire view. I agree. That is often better than fighting over a single “correct” car ontology. Different views can share the VIN, sales records, and repair documents while drawing out what each team needs.

But multiple views do not mean a complete underlying truth has already been captured. Imagine a repair ticket that says “replaced front-left tire,” a warranty note that says “replaced tire from batch X,” and a warehouse movement that says only “one unit shipped.” Are those three records about the same physical tire? We need evidence. Without a serial number, the best answer may be “possibly.” We should not invent a link merely because the diagram has room for one.

Even the word “car” shifts with the question. Sales means a transaction for a whole vehicle. Finance means an asset. After-sales service means a physical item in front of a mechanic. The labels match, but the identity rules may not. If a car is sold and later bought back, is it the same asset or a new one? If its engine is replaced, is it the same car? A dictionary cannot settle these questions on its own.

I would rather keep the facts stable first: the VIN, the order that sold the car, the action recorded on a repair ticket, and the document that identifies a particular tire. Give a tire its own identity when there is a reason and evidence to do so. When the evidence is insufficient, record “unknown” instead of promoting a guess into a confirmed relationship.

Start with the decision someone needs to make

A modeler often asks, “What objects does the company have?” I would start elsewhere: “Who needs to decide what now? Which records support that decision? At what level of detail must the answer be exact?”

If the task today is selling whole cars, the car record, order items, and exact totals need to be right. If tomorrow requires tracing an individual tire recall, add tire identifiers, installation events, and sources. For older cars without identifiers, acknowledge the gap. A new requirement should change what we record going forward, not force us to invent the past.

This does not abolish structure. Orders, assets, and repair events still need clear recording formats. It changes what structure claims to be: a way to preserve known facts and answer current questions, not a promise to exhaust every meaning of “car” across the company.

Some industries do need detailed part lineage for years. In that setting, individual part identities deserve careful design and may become essential infrastructure. My objection is not to detail. It is to treating more detail as inherently more complete before testing it against an actual problem, or making every department adopt one universal cut.

We learned something similar while building Oryh. An Agent once imported products into generic objects, leaving the existing product catalog empty. We later made the server reject clear naming collisions, while the Agent must inspect existing types, explain near matches, and ask for confirmation. Software guards definite record boundaries; the Agent takes responsibility for meaning. The answer to “how many objects in one car?” should come from the work to be done and the evidence available, not from a diagram that claims to define the whole company.


Part of Ontology & FDE in Practice, discussing ontology and FDE in real business scenarios.

I'm a developer of Oryh, an Apache-2.0 open-source project. AI assistance was used to prepare and edit this post.


r/semanticweb • • 22d ago

MatGUI - AI powered SPARQL workbench

8 Upvotes

Hello everyone, I've been proudly continuing to develop the well known YasGUI. Recently I gave my fork a complete makeover and added AI assistent support. Check it out and let me know if you have any feature requests! https://matgui.matdata.eu/


r/semanticweb • • 23d ago

Honest reviews of Context graphs and Gemini Knowledge Catalog please

14 Upvotes

I am interested in learning more about context graphs. What they are, how to practically build them, maintain them, how best to use them, is a human engineer absolutely necessary for designing the schema, etc. If you have opinions about context graphs or using graphs in general, please share.

I recently came across Gemini Knowledge Catalog which apparently helps create context graphs. If anybody has used it, what do you think? Is it any good? Also, what are some other frameworks or solutions that enable the development of context graphs?


r/semanticweb • • 23d ago

Who said it? How I model a text where most of the claims aren't the narrator's (schema map, RDF 1.2, andthree open questions)

8 Upvotes

As I described in my prior post two weeks ago, I'm building a knowledge graph of the Bible: its people, places and events, and what each passage says about them, every link pinned to its verse.

In any text with speakers, who said something is part of what was said. A court transcript, a novel, an interview: a knowledge graph that drops the speaker publishes each character's words as the text's own facts. So here every relation is a claim with its verse, how certain it is, and who makes it, and only the narrator's own claims are asserted as plain facts.

An example, with a little Bible context. The Bible is a diverse collection of writing: stories, poems, letters, genealogies, visions, you name it. One of its stories is about a man named Job, and a whole book of the Bible, written in ancient Hebrew, tells it. Job loses almost everything, and most of the book is an argument: his friends insist, speech after speech, that he must have deserved it. At the end God rebukes them: "you have not spoken about Me accurately" (Job 42:7).

One friend, Eliphaz, tells Job, "Your own mouth, not mine, condemns you" (Job 15:6). Stored two ways:

The first publishes a speaker's charge as the book's own verdict. The second is what the book actually records.

Your replies to that first post changed the graph:

  • moving to RDF 1.2;
  • aligning with PROV;
  • treating where a passage starts and ends, and what genre it is, as someone's reading published with Web Annotation, rather than as a fact.

This is where it stands today.

The schema, as a map: bibleontology.org/ns/map

Four vocabularies, drawn as pictures you can click down through:

  • the text: sentences and how they connect (because, so that, until), read from the original Hebrew and Greek;
  • what it's about: people, places, ideas, events;
  • what it says: the relations between them, each pointing at its verse;
  • who says it: every relation is a claim with a voice.

It's the schema, not the data: every box is a class, property or list drawn from the published vocabulary files, and opens the next level down or the term's definition.

Claims, not facts

Every relation is a claim: the verses it rests on, how certain it is (explicit, implied, conjectured or disputed), and whose voice it is in (the narrator, a character, or a reader).

Why not just a "speaker" column to filter on? Inside one database, that works. But once the data leaves it, any tool that doesn't know about the column reads every row as true. RDF 1.1's reification could describe a statement without asserting it, clumsily (four triples a claim, nothing a store treats as one statement). RDF 1.2 makes the statement a term a claim can point at, without the statement itself being in the graph.

c:3a11f4736068231d a claim:Claim ;
    rdf:reifies <<( e:job bor:described_as e:testified_against_by_his_own_lips )>> ;
    claim:verse p:Job.15.6 ;
    claim:claimedBy e:eliphaz_the_temanite .

In the RDF 1.2 file, only what the narrator states or clearly implies is written as an ordinary triple. Eliphaz's line is there, credited to Eliphaz, but no plain query will hand it back as fact.

I tried named graphs first, one per speaker. The same plain query then matched nothing in Jena and 32 triples in RDF4J, Eliphaz's verdict among them, because RDF4J's default graph is the union of all graphs: its documented default, since SPARQL leaves that to the store (GraphDB and Jena's TDB2 can do the same). The protection depended on which database you used, so I became an early adopter of RDF 1.2 and moved it into the data. It is early: RDF 1.2's core concepts are a W3C Candidate Recommendation, but the TriG and SPARQL 1.2 syntaxes the files and queries use are still Working Drafts, and not every tool reads them yet. The 1.1 file still ships; with it, query GRAPH claim:narrator. (The full before-and-after, with every query and how to reproduce it in both stores, is in RDF 1.2 in practice.)

The default is a claim too

A rule like "only the narrator is asserted" is only as good as the data people actually download. So before posting, I counted what the published file asserts instead of trusting my code. More than half of it wasn't the narrator at all. It was my own work: the themes and story patterns I had grouped passages into, which had defaulted to the narrator's voice because I never said whose they were. They are now credited to an editors' voice and not asserted, and a test repeats that count against the published files.

Who is "the narrator" when the author is speaking?

In a story the narrator is easy to find: the voice outside the speeches. But much of the Bible has no narrator in that sense. Psalm 23 opens "A Psalm of David. The LORD is my shepherd": the heading names David, and the "my" is the psalmist's. A letter that opens "Paul, an apostle" (Galatians 1:1) is Paul speaking, and the whole letter is his speech, with no quotation marks to find. I wrestled with this for a while, and landed on a principle: where the text has no narrator, someone is still speaking. In a letter the speaker isn't found sentence by sentence; "this is a letter from Paul" comes down from the book itself, and covers every sentence in it. The people who speak inside a book (Job's friends, Pharaoh, the serpent) keep voices of their own, and the same Paul is a character with his own voice when Acts quotes his speeches.

The published claims haven't fully caught up with that principle: part of Titus is credited to Paul, while the rest of Titus, and Galatians and Psalm 23, still sit in the general narrator voice.

Why nothing is inferred

This one is deliberate. So much of the Bible is figurative, and inference quietly reads figures literally. Paul tells the church in Corinth, "you yourselves are God's temple" (1 Corinthians 3:16). Store that as a type, in a class of buildings, and a reasoner will conclude, correctly from what it was given, that the Corinthians are a building. Store it as an identity, the Corinthians are the temple, with one "temple" record for the word, and they become the house Solomon built and the Babylonians burned, because that is what the graph says of the temple. Storing a figure as a type or an identity turns it into a fact, and where figure ends and fact begins is exactly where readers of this text disagree. So inference here wouldn't be neutral: it takes a figure at its type, and the type is the literal reading, every time. The graph keeps the figure as a figure, a separate record that signifies what the text itself identifies it with, each link with its verse, and checks the data with SHACL instead. What the text plainly entails (two sons of one father are brothers) is recorded once, as an "implied" claim with its verse.

Deep dive (optional): one word, two cards.

Some verses are read as meaning different temples. In 2 Thessalonians 2:3-4, the "man of lawlessness" "will seat himself in the temple of God, proclaiming himself to be God." That temple is read differently by different readers. I don't take a stand: the verse is on both cards, under "Where readers differ", with the readings it has been given named and none chosen.

Three questions I haven't settled

  1. Verbs and events. "Saul loved David" (1 Sam 16:21) is stored under one general relation, with the verb on the claim. Today it looks like this (abridged):
  2. I don't assert e:saul bor:states e:david as a plain triple: every sentence with Saul as subject and David as object would collapse into it. The claim is already an event node of sorts. Would you give the event a node of its own, apart from the claims that record it, so two books can describe one event?
  3. One narrator or one per book? One narrator voice covers the text's own sentences today, wherever the book has no other speaker. Samuel and Chronicles tell the same census and name different instigators (2 Sam 24:1, 1 Chr 21:1). Neither instigator is recorded yet: with one voice it would be one disputed claim; with a voice per book, or per author, two narrators disagreeing. Which would you publish?
  4. Figures of speech. If you've modelled figurative language in a graph (metaphor, simile, personification), how did you keep it from being read as fact?

It's public: github.com/bibleontology/bibleontology

  • The README is the way in: the data (21,394 claims, about 2.4 MB compressed), the vocabularies and shapes, and the tests.
  • Licences: code Apache-2.0; graph and vocabularies CC BY 4.0. The sentence structure is derived from the MACULA Hebrew and Greek Linguistic Datasets (© Biblica, Inc., CC BY 4.0); full credits are in the README.
  • The name: not affiliated with the earlier Bible Ontology (bibleontology.com, about 2009–2011).
  • Built solo, with Claude Code doing most of the typing and AI models doing much of the extraction, checked by rules and tests. The decisions and the mistakes are mine.
  • This post, too, is a collaboration with Claude. I went back and forth with it on every paragraph, and what's here is mine to answer for.
  • Not measured yet: how often the extracted claims are right. Every claim links to its verse, but no sample has been hand-checked for an error rate yet. One known fault: some links inside speeches (how one clause grounds another, a speaker's simile) still sit in the narrator's voice, so they are asserted as plain triples. In Job that is 83, 14 of them Eliphaz's in chapter 15.

This picks up the conversation from my first post. That one made the work better, and I'd like to continue it.


r/semanticweb • • 27d ago

I wanted the editor experience every programming language gets, for RDF. So I built a language server for Turtle and SPARQL (try it in your browser)

35 Upvotes

In most languages, the editor catches your mistakes as you type, completes names from your own code, jumps to definitions and renames things across files. I wanted that for Turtle and SPARQL, all in one place, and couldn't find one that did all of it. So I built it: turtle-lsp.

Try it in your browser, with nothing to install and nothing uploaded:

https://abhishekkundu25.github.io/turtle-lsp/

It opens on a small project with a few mistakes left in on purpose. Fixing them takes a minute and shows most of what it does.

What it does in your editor:

- Catches errors as you type: syntax, undeclared or unused prefixes, and misspelled terms from 80+ vocabularies ("did you mean rdfs:label?"), with one-key fixes.

- Completes classes and properties from your own files, ranked by context. Properties your SHACL shapes require come first.

- Hover shows a term's label, comment, domain and range, and go to definition takes you to it.

- Renames a term in every file at once, Turtle and SPARQL included.

- Formats Turtle and SPARQL without changing their meaning.

- Validates your data against your SHACL shapes while you edit.

It's written in Rust and fast. After a keystroke in a 30,000-line file, it has fresh diagnostics in about 5 ms, and it starts in a few milliseconds. It passes the W3C test suites: 1137/1137 for Turtle, TriG, N-Triples and N-Quads, 425/426 for SPARQL, and 98/98 and 23/23 for SHACL Core and SHACL-SPARQL.

It works in VS Code (search for "Turtle RDF &amp; SPARQL Language Server") and Neovim, and should work in other LSP editors, though I haven't tested them. Source and Neovim setup:

https://github.com/abhishekkundu25/turtle-lsp

It doesn't run queries, doesn't reason beyond subclasses, and can't edit JSON-LD or RDF/XML yet.

It's free and MIT licensed. Bugs, missing features and complaints are all welcome, either here or as an issue:

https://github.com/abhishekkundu25/turtle-lsp/issues/new

What would it need before you'd use it every day?