Commit graph

129 commits

Author SHA1 Message Date
kempersc
d5d970b513 Remove deprecated slot definitions and add archived versions for future reference
- Deleted the following slot definitions:
  - wikidata_class_slot
  - wikidata_entity_label_slot
  - wikidata_mapping_rationale_slot
  - word_count_slot

- Added archived versions of the deleted slots to preserve historical data:
  - wikidata_class_archived_20260114.yaml
  - wikidata_entity_label_archived_20260114.yaml
  - wikidata_mapping_rationale_archived_20260114.yaml
  - word_count_archived_20260114.yaml

- Introduced a new hook `usePersonSearch` for enhanced semantic search functionality in the frontend, supporting debounced queries and caching.
2026-01-14 22:57:09 +01:00
kempersc
58940582c3 Refactor warehouse and video slots: Migrate and archive multiple slots including warehouse_security_level, warehouse_name, and video_id. Introduce UnitIdentifier class to replace unit_id and unit_identifier slots. Update consuming classes and document migration details. Archive obsolete slot definitions for track_id, tracking_ids_assigned, vendor_name, and others. Ensure compliance with migration rules and maintain historical records in the archive. 2026-01-14 22:20:44 +01:00
kempersc
d3d5c5cdde feat: Update manifest and refactor EnvironmentalZone schema with new slot mappings and archived slots
- Updated generated timestamp in manifest.json
- Refactored EnvironmentalZone.yaml to replace zone_name and zone_description with has_or_had_label and has_or_had_description respectively
- Archived previous slots zone_name, zone_id, and zone_description with detailed migration notes
- Introduced new classes for ApprovalTimeType, ApprovalTimeTypes, ISO639-3Identifier, Investment, InvestmentArea, Language, Liability, NetAsset, ResourceType, ResponseFormat, ResponseFormatType, Token, TrackIdentifier, TraditionalProductType, TranscriptFormat, TypeStatus, UNESCODomain, UNESCODomainType, VenueTypes, and VideoFrames with appropriate attributes and slots
- Added subclasses for ApprovalTimeTypes, ResponseFormatTypes, TraditionalProductTypes, and UNESCODomainTypes
2026-01-14 20:40:08 +01:00
kempersc
7a72a1d096 Add new classes and slots for enhanced data modeling
- Introduced VerificationStatus, Verifier, VersionNumber, ViabilityStatus, VideoCategoryIdentifier, VideoIdentifier, WhatsAppProfile, WordCount, WorkRevision, and WorldCatIdentifier classes to capture various aspects of data verification, categorization, and identification.
- Created corresponding slots such as analyzes_or_analyzed, unit_type, years_restricted, benefits_provided, consumes_or_consumed, has_or_had_contact_details, has_or_had_investment, has_or_had_liability, has_or_had_likelihood_score, has_or_had_location, has_or_had_net_asset, is_or_was_affiliated_with, is_or_was_allocated_to, is_or_was_alternative_form_of, is_or_was_categorized_as, is_or_was_used_by, and was_last_updated_at to facilitate detailed tracking and categorization of entities and their attributes.
- Each class and slot includes detailed descriptions, usage examples, and mappings to relevant ontologies to ensure interoperability and clarity in data representation.
2026-01-14 20:32:45 +01:00
kempersc
13ba8fb09b style(entity-review): Improve header button styling and icon sizes
- Increase icon sizes from 16px to 20px for better visibility
- Add borders and shadows to header action buttons
- Improve hover states with color transitions
- Add proper dark mode styling for all button variants
2026-01-14 19:56:24 +01:00
kempersc
a981bb7ca3 feat(linkml): Add slot_usage comparison popup in schema viewer
- Add 'slot_usage' type to SchemaElementPopup for comparing generic slots vs class overrides
- Show side-by-side comparison table with property, generic value, and override value
- Display green 'changed' badges for modified properties
- Add dual navigation buttons (Go to class / Go to slot)
- Include comprehensive dark mode support
- Match styling to main page's comparison view (green color scheme)
2026-01-14 19:55:57 +01:00
kempersc
6da794ee38 feat: Introduce new slots and classes for enhanced heritage data modeling
- Added `has_or_had_place_of_birth` slot to capture structured birth place information with historical context.
- Introduced `has_or_had_quantity` slot for capturing quantified values with units and provenance.
- Created `has_or_had_service_area` slot to define geographic service areas for heritage custodians.
- Implemented `is_or_was_approximate` slot to indicate uncertainty in values (dates, quantities).
- Added `is_or_was_asserted_by` slot to track the agent responsible for assertions.
- Introduced `Asserter` class to model agents making assertions, including types like human, automated, and AI.
- Created `Quantity` class to represent quantified values with optional units and types.
- Added enums for `AsserterTypeEnum` and `QuantityTypeEnum` to standardize types of asserters and quantities.
- Archived outdated slots and replaced them with new structured alternatives following RiC-O conventions.
2026-01-14 16:54:10 +01:00
kempersc
5ddb7e818a Refactor schema: Migrate slots to new patterns and create new classes
- Migrated `audio_event_segments` to `has_or_had_segment` with range `AudioEventSegment` in VideoAudioAnnotation.yaml.
- Removed deprecated slots: `approved_by`, `audio_event_segments`, `bay_number`, `box_number`, and `budget_status`.
- Created new classes: `AudioEventSegment`, `BayNumber`, `BoxNumber`, and `BudgetStatus` to encapsulate previously slot-based data.
- Introduced `has_or_had_auxiliary_entities` slot to replace `auxiliary_places` and `auxiliary_platforms`.
- Archived removed slots to maintain historical context.
- Updated LinkMLViewerPage to utilize new schema element popup for better navigation.
2026-01-14 15:20:53 +01:00
kempersc
7691a11e79 chore: Update generated timestamp in manifest.json and archive budget_status slot 2026-01-14 15:14:23 +01:00
kempersc
7c7d8c0270 feat: Add SchemaElementPopup component for displaying LinkML schema element previews
- Implemented a draggable, resizable, and minimizable popup component for displaying previews of LinkML schema elements (classes, slots, enums).
- Integrated loading states and error handling for fetching element information.
- Added navigation functionality to go to full element view.
- Enhanced user experience with type badges and detailed descriptions for each element type.

chore: Migrate AudioEventSegment, BayNumber, BoxNumber, and BudgetStatus classes to new YAML schema format

- Created new YAML definitions for AudioEventSegment, BayNumber, BoxNumber, and BudgetStatus classes with detailed descriptions and attributes.
- Migrated from deprecated slots to new class structures as part of Rule 53.
- Updated imports and prefixes for consistency across schemas.

chore: Archive deprecated slots for audio_event_segments, bay_number, and box_number

- Archived previous slot definitions for audio_event_segments, bay_number, and box_number to maintain historical records.
- Updated slot descriptions and ensured proper URI mappings for future reference.
2026-01-14 15:13:06 +01:00
kempersc
b927bc4b43 Update manifest.json and migrate approved_by slot to is_or_was_approved_by; add includes_or_included slot to InformationCarrier; remove bookplate slot and archive it 2026-01-14 15:05:37 +01:00
kempersc
21c207c9da Refactor schema slots and classes for improved clarity and structure
- Migrated `archived_at` to `is_or_was_archived_at` in AuxiliaryDigitalPlatform, WebObservation, and other relevant classes to better reflect historical archival status.
- Removed `bold_id` slot and replaced it with `has_or_had_identifier` linked to the new `BOLDIdentifier` class in BiologicalObject.
- Introduced `Bookplate` and `Approver` classes to enhance provenance tracking and ownership documentation.
- Updated `InformationCarrier` to replace `bookplate` with `includes_or_included` for better representation of ownership marks.
- Added new slots `is_or_was_approved_by` and `is_or_was_archived_at` to capture historical approval and archival locations.
- Archived old slot definitions for `archived_at` and `bold_id` to maintain schema integrity.
- Enhanced LinkedIn profile extraction functionality by integrating Linkup API alongside Exa API.
2026-01-14 13:28:33 +01:00
kempersc
60e66d60f9 Add new slots and classes for enhanced documentation and availability tracking
- Introduced `is_or_was_created_through` slot to indicate content creation methods, replacing previous boolean flags.
- Added `is_or_was_required` slot for generic temporal boolean requirements, aligning with Schema.org.
- Created `AutoGeneration` class to represent automatic content generation, capturing methods and provenance.
- Established `AvailabilityStatus` class to model resource availability with temporal validity.
- Developed `Documentation` class for structured documentation resources, replacing domain-specific slots.
- Implemented `Taxon` class for biological classification in natural history collections.
- Archived previous slots related to API availability and documentation, ensuring a clean schema.
- Enhanced existing slots with detailed descriptions and examples for clarity and usability.
2026-01-14 13:09:31 +01:00
kempersc
b13674400f Refactor schema slots and classes for improved organization and clarity
- Removed deprecated slots: appraisal_notes, branch_id, is_or_was_real.
- Introduced new slots: has_or_had_notes, has_or_had_provenance.
- Created Notes class to encapsulate note-related metadata.
- Archived removed slots and classes in accordance with the new archive folder convention.
- Updated slot_fixes.yaml to reflect migration status and details.
- Enhanced documentation for new slots and classes, ensuring compliance with ontology alignment.
- Added new slots for note content, date, and type to support the Notes class.
2026-01-14 12:14:07 +01:00
kempersc
b8914761b8 standardise slots 2026-01-14 09:51:14 +01:00
kempersc
b30711fcfb update slots 2026-01-14 09:05:54 +01:00
kempersc
17da3a81e9 feat(review): add enhanced pagination with first/last page buttons and page input
- Add first page (<<) and last page (>>) navigation buttons
- Add direct page number input field for jumping to specific pages
- Update CSS styling for new pagination controls including input field
- Use stacked ChevronLeft/ChevronRight icons for first/last (lucide-react compatibility)
2026-01-13 23:27:28 +01:00
kempersc
ea8dc37905 feat(entity-review): add wrong person detection and confidence filtering
Some checks are pending
Deploy Frontend / build-and-deploy (push) Waiting to run
- Add is_likely_wrong_person and wrong_person_reason fields to MatchCandidate
- Add confidence_original field for tracking pre-adjustment scores
- Add visual indicators: AlertTriangle for wrong person, Star for high confidence
- Add filter checkboxes: 'Show high confidence (>80%)' and 'Hide wrong person'
- Add wrong person alert banner with bilingual labels (NL/EN)
- Add danger stat card showing count of likely wrong person matches
- Style signal badges by type: danger (birth_year_mismatch), success (validated)
- Add extensive CSS for wrong-person/high-confidence alerts and candidate styling
2026-01-13 20:49:47 +01:00
kempersc
fcf36f9a11 fix: prevent ontology popup flash by using useLayoutEffect for centering
All checks were successful
Deploy Frontend / build-and-deploy (push) Successful in 3m56s
DSPy RAG Evaluation / Layer 1 - Unit Tests (push) Successful in 11m5s
DSPy RAG Evaluation / Layer 2 - DSPy Module Tests (push) Successful in 12m50s
DSPy RAG Evaluation / Layer 3 - Integration Tests (push) Successful in 10m51s
DSPy RAG Evaluation / Layer 4 - Comprehensive Evaluation (push) Successful in 11m59s
DSPy RAG Evaluation / Quality Gate (push) Successful in 1s
2026-01-13 20:38:21 +01:00
kempersc
92b490d690 edit slots 2026-01-13 20:35:11 +01:00
kempersc
2907c0372a feat: add Getty AAT support and resolve PREMIS/BIBFRAME URIs to human-readable LOC docs
- Add Getty AAT (Art & Architecture Thesaurus) vocabulary support
  - fetchGettyAATEntity() fetches term info from vocab.getty.edu JSON-LD API
  - Extracts English labels, scope notes, and aliases
  - Shows 'concept' term type for SKOS concepts

- Add getHumanReadableUrl() to map RDF URIs to documentation pages
  - PREMIS 3.0: http://www.loc.gov/premis/rdf/v3/X → id.loc.gov HTML docs
  - BIBFRAME: http://id.loc.gov/ontologies/bibframe/X → id.loc.gov HTML docs
  - Uses c_ prefix for classes, p_ for properties

- Add Getty vocabulary prefixes (aat:, tgn:, ulan:)
- Add ontology badge colors for PREMIS 3, LOCN, Getty AAT
2026-01-13 19:14:31 +01:00
kempersc
fc63164335 fix: close ontology popup when navigating to different LinkML schema files
All checks were successful
Deploy Frontend / build-and-deploy (push) Successful in 4m17s
When users click on a different class, enum, or slot in the sidebar,
the ontology term popup now automatically closes. This prevents the
popup from persisting and showing stale information from the
previously viewed schema element.
2026-01-13 18:22:49 +01:00
kempersc
3b676f3ea5 fix: remove duplicate ontology mappings rendering in LinkML viewer
Some checks are pending
Deploy Frontend / build-and-deploy (push) Waiting to run
The slot details section was rendering close_mappings, narrow_mappings,
broad_mappings, and related_mappings twice each. This caused the mappings
to appear duplicated on pages like /linkml?class=AcademicArchive.

Removed 68 lines of duplicate JSX code.
2026-01-13 18:11:54 +01:00
kempersc
8a3c907f59 fix: resolve CIDOC-CRM relative URIs, add EDM ontology, render HTML in descriptions
Some checks failed
Deploy Frontend / build-and-deploy (push) Has been cancelled
DSPy RAG Evaluation / Layer 1 - Unit Tests (push) Successful in 11m12s
DSPy RAG Evaluation / Layer 2 - DSPy Module Tests (push) Successful in 12m55s
DSPy RAG Evaluation / Layer 3 - Integration Tests (push) Successful in 10m24s
DSPy RAG Evaluation / Layer 4 - Comprehensive Evaluation (push) Successful in 11m31s
DSPy RAG Evaluation / Quality Gate (push) Successful in 2s
- Fix resolveUri() to handle bare local names like 'E27_Site' used by CIDOC-CRM
  (previously only handled URIs starting with '#')
- Add EDM (Europeana Data Model) ontology to frontend
  - Copy edm.owl to frontend/public/ontology/
  - Register in ONTOLOGY_FILES array
  - Add 'edm' prefix to STANDARD_PREFIXES
  - Add EDM color to ONTOLOGY_COLORS
- Render HTML content in ontology descriptions safely using DOMPurify
  - Sanitize HTML to allow only safe tags (a, br, em, strong, etc.)
  - Fix Schema.org relative links to absolute URLs
  - Add target='_blank' to external links
2026-01-13 16:50:40 +01:00
kempersc
21ed120ac2 fix: correct hallucinated RiC-O terms and add locn ontology
RiC-O hallucinated terms fixed:
- FindingAidType.yaml: rico:FindingAidType → rico:DocumentaryFormType
- has_acquisition_method.yaml: rico:hasOrHadActivityType → prov:wasGeneratedBy
- has_activity_type.yaml: rico:hasOrHadActivityType → dcterms:type
- has_arrangement.yaml: rico:hasOrHadArrangement → dcterms:description
- has_or_had_finding_aid.yaml: rico:isDescribedBy → rico:isOrWasDescribedBy

The following terms do NOT exist in RiC-O 1.1:
- rico:FindingAidType (use rico:DocumentaryFormType)
- rico:hasOrHadActivityType (no equivalent)
- rico:hasOrHadArrangement (no equivalent)
- rico:isDescribedBy (correct form: rico:isOrWasDescribedBy)

Added LOCN ontology support:
- Copied locn.ttl to frontend/public/ontology/
- Added LOCN to ONTOLOGY_FILES in ontology-loader.ts
- Added locn prefix to OntologyTermPopup.tsx
- LOCN (http://www.w3.org/ns/locn#) is W3C Location Core Vocabulary
  for addresses and geometry (used by locn:Address)
2026-01-13 16:42:32 +01:00
kempersc
6781073d06 fix: add @base directive support for Turtle/RDF parsing
The VCard ontology file (and 3 others) use @base directive with relative URIs
like <#Address>. The Turtle parser was not extracting @base or resolving
relative URIs against it.

Changes:
- Extract @base directive in first pass alongside @prefix
- Add baseUri parameter to expandUri() function
- Handle relative URIs starting with # (resolve against base)
- Handle empty relative URI <> (returns base URI itself)
- Pass baseUri through to processSubject() function

This fixes the 'Term not found' error for vcard:Address and similar terms
that use relative URI notation in their ontology definitions.

Affected ontologies: vcard.rdf, prov.ttl, era_ontology.ttl, ebg-ontology.ttl
2026-01-13 15:54:29 +01:00
kempersc
f2b10fca19 fix: correct hallucinated PREMIS terms and Schema.org namespace mismatch
All checks were successful
Deploy Frontend / build-and-deploy (push) Successful in 3m48s
PREMIS ontology fixes (8 schema files):
- Replace invalid premis:hasRepresentation with dcterms:hasFormat
- Replace invalid premis:hasAccessRestriction with odrl:hasPolicy
- Replace invalid premis:hasPreservationPolicy with dcterms:conformsTo
- Replace invalid premis:hasAccessPolicy with dcterms:accessRights
- Replace invalid premis:hasStoragePolicy with dcterms:conformsTo
- Replace invalid premis:ProcessingStatus with skos:Concept
- Add proper close_mappings to valid PREMIS classes (premis:Representation, etc.)
- Document hallucinated terms in Rule 51 (AGENTS.md) for future prevention

Schema.org namespace fixes (3 frontend files):
- Update OntologyTermPopup.tsx: add normalizeSchemaOrgUri() function
- Update ontology-loader.ts: change schema prefix to https://schema.org/
- Update linkml-schema-service.ts: change schema prefix to https://schema.org/
- The schemaorg.owl file uses https:// but code was using http://

These changes ensure ontology term lookups work correctly for Schema.org
terms and that LinkML schema files only reference valid ontology predicates.
2026-01-13 14:16:33 +01:00
kempersc
1fb924c412 feat: add ontology mappings to LinkML schema and enhance entity resolution
Schema enhancements (443 files):
- Add class_uri with proper ontology references (schema:, prov:, skos:, rico:)
- Add close_mappings, related_mappings per Rule 50 convention
- Replace stub hc: slot_uri with standard predicates (dcterms:identifier, skos:prefLabel)
- Improve descriptions with ontology mapping rationale
- Add prefixes blocks to all schema modules

Entity Resolution improvements:
- Add entity_resolution module with email semantics parsing
- Enhance build_entity_resolution.py with email-based matching signals
- Extend Entity Review API with filtering by signal types and count
- Add candidates caching and indexing for performance
- Add ReviewLoginPage component

New rules and documentation:
- Add Rule 51: No Hallucinated Ontology References
- Add .opencode/rules/no-hallucinated-ontology-references.md
- Add .opencode/rules/slot-ontology-mapping-reference.md
- Add adms.ttl and dqv.ttl ontology files

Frontend ontology support:
- Add RiC-O_1-1.rdf and schemaorg.owl to public/ontology
2026-01-13 13:51:02 +01:00
kempersc
c5fb9ec88e feat: add route for Entity Review page with lazy loading 2026-01-13 01:49:43 +01:00
kempersc
3b35f4aea5 Refactor code structure for improved readability and maintainability 2026-01-12 18:31:31 +01:00
kempersc
846a6cdcec Add new Record Set Types for various archival collections
- Introduced SoundArchiveRecordSetType, SpecialCollectionRecordSetType, SpecializedArchiveRecordSetType, SpecializedArchivesCzechiaRecordSetType, StateArchivesRecordSetType, StateArchivesSectionRecordSetType, StateDistrictArchiveRecordSetType, StateRegionalArchiveCzechiaRecordSetType, TelevisionArchiveRecordSetType, TradeUnionArchiveRecordSetType, UniversityArchiveRecordSetType, VereinsarchivRecordSetType, VerlagsarchivRecordSetType, VerwaltungsarchivRecordSetType, WebArchiveRecordSetType, and WomensArchivesRecordSetType.
- Each new type includes appropriate metadata, slots, and relationships to existing classes.
- Implemented a script to detect and fix Type class violations in LinkML files.
2026-01-12 15:20:29 +01:00
kempersc
355d8be51d centralise slots 2026-01-12 14:33:56 +01:00
kempersc
3e6c2367ad feat(linkml-viewer): UX improvements - entry counts, deep links, settings persistence
All checks were successful
Deploy Frontend / build-and-deploy (push) Successful in 4m4s
- Add entry count badge next to schema file name showing (xC, yE, zS) counts
- Add tooltip explaining LinkML file names vs class names
- Remove redundant section headers (Classes, Enums, Slots collapsible sections)
- Add URL params for enum (?enum=) and slot (?slot=) deep linking
- Persist category filters, dev tools visibility, and legend visibility to localStorage
- Set 'Main Schema' filter to OFF by default (confusing for users)
- Add Rule 48: Class files must not define inline slots
2026-01-11 21:42:35 +01:00
kempersc
10bb5b69c5 Add Environmental Zone Type Enumeration and related slots
- Introduced EnvironmentalZoneTypeEnum.yaml to classify climate-controlled storage zones with detailed descriptions and recommended conditions for various materials.
- Created slots for environmental zone type code, description, ID, label, and HC preset URI to facilitate structured data representation.
- Implemented boolean slots for specific environmental requirements including dark storage, dust-free environment, ESD protection, and UV filtering, referencing relevant ISO standards.
- Enhanced documentation for each slot to clarify usage and preservation context.
2026-01-11 21:14:59 +01:00
kempersc
0f7fbf1ca0 feat(ci): add Forgejo Actions workflow for auto-deploy on LinkML schema changes
Some checks are pending
Deploy Frontend / build-and-deploy (push) Waiting to run
Infrastructure changes to enable automatic frontend deployment when schemas change:

- Add .forgejo/workflows/deploy-frontend.yml workflow triggered by:
  - Changes to frontend/** or schemas/20251121/linkml/**
  - Manual workflow dispatch

- Rewrite generate-schema-manifest.cjs to properly scan all schema directories
  - Recursively scans classes, enums, slots, modules directories
  - Uses singular category names (class, enum, slot) matching TypeScript types
  - Includes all 4 main schemas at root level
  - Skips archive directories and backup files

- Update schema-loader.ts to match new manifest format
  - Add SchemaCategory interface
  - Update SchemaManifest to use categories as array
  - Add flattenCategories() helper function
  - Add getSchemaCategories() and getSchemaCategoriesSync() functions

The workflow builds frontend with updated manifest and deploys to bronhouder.nl
2026-01-11 14:16:57 +01:00
kempersc
9726cc7917 feat(frontend): Add AnnotationMotivationType to LinkML schema manifest
Add new AnnotationMotivationType and AnnotationMotivationTypes to the
SCHEMA_FILES array so they appear in the /linkml viewer.
2026-01-11 13:56:11 +01:00
kempersc
6c19ef8661 feat(rag): add Rule 46 epistemic provenance tracking
Track full lineage of RAG responses: WHERE data comes from, WHEN it was
retrieved, HOW it was processed (SPARQL/vector/LLM).

Backend changes:
- Add provenance.py with EpistemicProvenance, DataTier, SourceAttribution
- Integrate provenance into MultiSourceRetriever.merge_results()
- Return epistemic_provenance in DSPyQueryResponse

Frontend changes:
- Pass EpistemicProvenance through useMultiDatabaseRAG hook
- Display provenance in ConversationPage (for cache transparency)

Schema fixes:
- Fix truncated example in has_observation.yaml slot definition

References:
- Pavlyshyn's Context Graphs and Data Traces paper
- LinkML ProvenanceBlock schema pattern
2026-01-10 18:42:43 +01:00
kempersc
28c3aaf33f enrich profiles 2026-01-10 17:31:02 +01:00
kempersc
f7bd3e9edc feat(linkml-viewer): add slot_usage side-by-side comparison view
- Add 'Compare' toggle button next to slots with slot_usage overrides
- Show generic slot definition vs class-specific override in 3-column grid
- Highlight changed properties with green 'changed' badge
- Display '(inherited)' when override matches generic definition
- Display '(not defined)' when generic has no value for property
- Compare: range, description, required, multivalued, slot_uri, pattern, identifier
- Full i18n support (Dutch/English translations)
- Responsive design: stacks vertically on mobile (<640px)
2026-01-09 21:02:14 +01:00
kempersc
9e67d0f967 enrich profiles 2026-01-09 20:35:19 +01:00
kempersc
1ad717767a feat(linkml-viewer): add visual indicators for slot_usage overrides
- Add green 'slot_usage' badge for slots with class-specific overrides
- Add ✦ markers next to properties that are overridden vs inherited
- Add green left border styling for slots with slot_usage
- Add i18n translations (nl/en) for override indicators
- Merge generic slot definitions with class-specific slot_usage properties

This helps users understand which slot properties come from the generic
slot definition vs which are overridden at the class level via slot_usage.
2026-01-09 18:23:21 +01:00
kempersc
c88fd3af70 Refactor code structure for improved readability and maintainability 2026-01-09 11:05:26 +01:00
kempersc
6608a207d4 update frontend 2026-01-08 15:56:28 +01:00
kempersc
0b0ea75070 feat(rag): add factual query fast path - skip LLM for count/list queries
- Add ontology cache warming at startup in lifespan() function
- Add is_factual_query() detection in template_sparql.py (12 templates)
- Add factual_result and sparql_query fields to DSPyQueryResponse
- Skip LLM generation for factual templates (count, list, compare)
- Execute SPARQL directly and return results as table (~15s → ~2s latency)
- Update ConversationPanel.tsx to render factual results table
- Add CSS styling for factual results with green theme

For queries like 'hoeveel archieven zijn er in Den Haag', the SPARQL
results ARE the answer - no need for expensive LLM prose generation.
2026-01-08 13:34:23 +01:00
kempersc
81da4ede50 Add comprehensive slot visualization to LinkML viewer
- Add standalone Slots section in visual view alongside Classes and Enums
- Display slot_uri, range, identifier badge, description, pattern
- Show examples with value/description pairs
- Color-coded SKOS mapping tags (exact/close/narrow/broad/related)
- Yellow highlighted comments section
- Custodian type filtering works with slots
- Shared renderSlotDetails() function for consistency
2026-01-07 22:03:08 +01:00
kempersc
98c42bf272 Fix LinkML URI conflicts and generate RDF outputs
- Fix scope_note → finding_aid_scope_note in FindingAid.yaml
- Remove duplicate wikidata_entity slot from CustodianType.yaml (import instead)
- Remove duplicate rico_record_set_type from class_metadata_slots.yaml
- Fix range types for equals_string compatibility (uriorcurie → string)
- Move class names from close_mappings to see_also in 10 RecordSetTypes files
- Generate all RDF formats: OWL, N-Triples, RDF/XML, N3, JSON-LD context
- Sync schemas to frontend/public/schemas/

Files: 1,151 changed (includes prior CustodianType migration)
2026-01-07 12:32:59 +01:00
kempersc
11983014bb Enhance specificity scoring system integration with existing infrastructure
- Updated documentation to clarify integration points with existing components in the RAG pipeline and DSPy framework.
- Added detailed mapping of SPARQL templates to context templates for improved specificity filtering.
- Implemented wrapper patterns around existing classifiers to extend functionality without duplication.
- Introduced new tests for the SpecificityAwareClassifier and SPARQLToContextMapper to ensure proper integration and functionality.
- Enhanced the CustodianRDFConverter to include ISO country and subregion codes from GHCID for better geospatial data handling.
2026-01-05 17:37:49 +01:00
kempersc
41d8905661 Fix Turtle parser multi-line string handling for PiCo ontology
- Fixed bug where closing triple-quotes (""") would incorrectly re-trigger
  multi-line string detection, causing subsequent class definitions to be skipped
- Added lineToProcess variable to track which portion of line to process after
  closing a multi-line string, preventing re-detection of opening quotes
- Moved UML large diagram confirmation logic from OntologyViewerPage to
  UMLVisualization component for better encapsulation
- PiCo ontology now correctly shows all 8 classes instead of 2

Deployed and verified on https://bronhouder.nl/ontology?ontology=PiCo
2026-01-05 11:25:43 +01:00
kempersc
242bc8bb35 Add new slots for heritage custodian entities
- Created deliverables_slot for expected or achieved deliverable outputs.
- Introduced event_id_slot for persistent unique event identifiers.
- Added follow_up_date_slot for scheduled follow-up action dates.
- Implemented object_ref_slot for references to heritage objects.
- Established price_slot for price information across entities.
- Added price_currency_slot for currency codes in price information.
- Created protocol_slot for API protocol specifications.
- Introduced provenance_text_slot for full provenance entry text.
- Added record_type_slot for classification of record types.
- Implemented response_formats_slot for supported API response formats.
- Established status_slot for current status of entities or activities.
- Added FactualCountDisplay component for displaying count query results.
- Introduced ReplyTypeIndicator component for visualizing reply types.
- Created approval_date_slot for formal approval dates.
- Added authentication_required_slot for API authentication status.
- Implemented capacity_items_slot for maximum storage capacity.
- Established conservation_lab_slot for conservation laboratory information.
- Added cost_usd_slot for API operation costs in USD.
2026-01-05 00:49:05 +01:00
kempersc
89001fbc53 compact header controls on OntologyViewer and QueryBuilder pages 2026-01-04 17:29:34 +01:00