Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide spans of named entities #464

Merged
merged 8 commits into from
Oct 10, 2024

Conversation

caufieldjh
Copy link
Member

Where possible (i.e., an extracted named entity is explicitly mentioned in the input text), its corresponding span will be provided in the list of named entities, a la:

named_entities:
  - id: AUTO:erosion
    label: erosion
    original_spans:
      - 29:35
  - id: SNOMEDCT:263913002
    label: ulceration
    original_spans:
      - 44:53

These will not be included if the named entity isn't present in the input text, and this may happen if the prompt instructs the raw response to be transformed in some way (e.g., the raw text contains "ulceration" but the extraction instructions cause the LLM to represent it as "TRUE", as in "yes there is an ulceration", then the span details won't appear)

@caufieldjh caufieldjh linked an issue Oct 10, 2024 that may be closed by this pull request
@caufieldjh caufieldjh marked this pull request as ready for review October 10, 2024 20:42
@caufieldjh caufieldjh merged commit c1a0427 into main Oct 10, 2024
2 checks passed
@caufieldjh caufieldjh deleted the 462-enable-including-spans-of-extracted-entities branch October 10, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable including spans of extracted entities
1 participant