Repository navigation
Add SPARQL skills: write-ltlod-sparql (mechanics) + investigate-ltlod (recipes) - #87
Merged
Merged
Conversation
… (recipes) Two agent skills that package how to query the LTLOD datasets, which CLAUDE.md (ETL/dev) and EXAMPLES.md (worked queries) don't: - write-ltlod-sparql — query mechanics, independent of the question: the named-graph- per-document data shape, how to run a query (the throttled live /sparql endpoint vs. a local TDB2 store built from the TriG — the preferred path for anything bulk), and the query-shape rules that decide empty-vs-right and fast-vs-hung (one GRAPH block per document, no union graph, no alt-path with unbound subject in a block, no per-row FILTER NOT EXISTS over the store, read values via triples not IRI string-parsing, --base always). Triggers on writing/debugging/optimizing any LTLOD SPARQL, incl. authoring app views and example queries. - investigate-ltlod — turns an investigative question into the right query: the join-key map (JAR code / asmens_id / AR codes / calendar connect the registers as the same IRI), where each domain lives, recipes (follow a company's public money; a politician's interests vs. contracts/funds; a supplier below the procurement radar; campaign donors), and the caveats that change a conclusion (matchMethod precision, suppressed <3 cells, links that dangle until the full JAR loads, the unmodeled hash-keyed gaps). Builds on and points to write-ltlod-sparql; references EXAMPLES.md / URI-SCHEME.md rather than copying. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two agent skills that package how to query the LTLOD dataset, which the existing docs don't: CLAUDE.md is ETL/dev-facing,
EXAMPLES.mdis a query catalogue,URI-SCHEME.mdis the URI map — but nothing teaches an agent to go from a question to a correct, performant query.write-ltlod-sparql— mechanics (how to write/run a correct, fast query)Independent of what you're asking:
GRAPH ?gblock per document; cross-document joins across blocks)https://linkeddata.lt/sparqlendpoint (throttled — 2r/s burst 10,429beyond; a few interactive queries only) vs. a local TDB2 store —queries/run.sh, and building a persistent store once withriot --base | tdb2.tdbloader+tdb2.tdbqueryfor repeated/bulk work (never in-memoryarqover the TriG for GRAPH queries)FROM <urn:x-arq:UnionGraph>, no alt-path with unbound subject in aGRAPHblock, no per-rowFILTER NOT EXISTSover the store, read values via triples (skos:notation/dct:identifier) not by string-parsing IRIs, always--base, plus a "query returns empty" checklistapp/*.ttlviews andqueries/*.rq.investigate-ltlod— recipes (what to join to answer a question)asmens_id/ AR codes / calendar connect the registers as the same IRI, so joins need no lookupEXAMPLES.mdqueryltlod:matchMethodprecision (filtername-and-office), suppressed <3 natural-person cells, links that dangle until the full JAR is loaded, and the unmodeled hash-keyed gaps (NMA applicants, finmin repayments/irregularities) + the EU-amount/2021-27 limitswrite-ltlod-sparql; referencesEXAMPLES.md/URI-SCHEME.mdrather than copying, so it stays small and doesn't drift.All recipe-referenced example queries exist on
master(Tier-1 series #81–#86). No code changes — docs/skills only.🤖 Generated with Claude Code