Skip to content

Tag Origin Tracing & Flagging for Programme Areas #64

Description

@lauxenz

As a Data Quality Analyst / Platform User
I want to see how each topic tag was generated (exact metadata match vs. regex keyword fallback)
So that I can assess the confidence level of the classification and easily spot potential false positives.
Acceptance Criteria
AC 1: Data Structure Update
The data structure for tags_focus inside the preprocessed JSON must be upgraded from a simple list of strings to a list of objects containing metadata.
Old format: ["Health", "Education"]
New format:

[
  { "tag": "Health", "source": "exact_match" },
  { "tag": "Education", "source": "regex_fallback" }
]

AC 2: Classification Flagging
If a tag is found via extract_tags_robust() (exact string match in the header zone), it must be flagged as "exact_match".
If a tag is found via extract_tags_final() (keyword regex search in the text body/fallback fields), it must be flagged as "regex_fallback".
AC 3: UI Visibility (Frontend Target)
The UI must read this flag and visually distinguish the tags. For example:
exact_match tags are displayed normally (e.g., solid green badge).
regex_fallback tags are visually flagged (e.g., bordered/dashed styling or an information icon tooltip stating: "Derived from text analysis").

Metadata

Metadata

Assignees

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