Skip to content

feat: replace _extract_keywords with LLM-generated tags in metadata node #2

Description

@wmobley

Background

The metadata analysis node currently uses a hardcoded keyword candidate set (_extract_keywords) to populate CKAN tags. This set is domain-specific and misses most real-world vocabulary (e.g. drone, photogrammetry, lidar, ODM).

The function was partially removed in the ODM metadata fix PR — the direct call in _guess_dataset_metadata is gone. The function itself remains in use by _text_metadata and _json_metadata to surface candidate keywords as evidence for the LLM.

What to explore

Compare these approaches for tag generation in _prompt_guided_metadata:

  1. Current (partial): LLM receives _extract_keywords matches as evidence in the file report; LLM generates final tags from that evidence + user message + file content preview.
  2. Full removal: Remove _extract_keywords from _text_metadata / _json_metadata entirely; let the LLM generate tags purely from the file previews and user context.
  3. Domain-vocabulary seeding: Pass a domain vocabulary (e.g. from the schema or organization) to the LLM prompt rather than a hardcoded code-level list.

Goal

Find the approach that produces the most accurate, specific, and useful tags for diverse dataset types (geospatial, photogrammetry, hydrology, notebooks, etc.) without missing common terms.

Acceptance criteria

  • Benchmark tag quality on 3–5 representative datasets (ODM outputs, MODFLOW notebooks, tabular CSV)
  • No hardcoded candidate list remains in the production code path
  • Tags are generated or filtered by the LLM, not string matching

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions