Skip to content

Commit a5f65cb

Browse files
committed
feat: improve llm qualifier concurrency, rationalize args, standardize schema w/ pydantic
1 parent 9018780 commit a5f65cb

File tree

14 files changed

+1217
-1370
lines changed

14 files changed

+1217
-1370
lines changed

docs/pipes/llm/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ to perform various information extraction tasks.
1010
| Component | Description |
1111
|----------------------------|-----------------------------------------------------------|
1212
| `eds.llm_markup_extractor` | Extract structured information using LLMs through markup. |
13+
| `eds.llm_span_qualifier` | Predict attributes of spans using LLMs. |
1314

1415
<!-- --8<-- [end:components] -->
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# LLM Span Qualifier {: #edsnlp.pipes.llm.llm_span_qualifier.factory.create_component }
2+
3+
::: edsnlp.pipes.llm.llm_span_qualifier.factory.create_component
4+
options:
5+
heading_level: 3
6+
show_bases: false
7+
show_source: false
8+
only_class_level: true

docs/pipes/qualifiers/llm-qualifier.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

docs/tutorials/qualifying-entities-with-llm.md

Lines changed: 0 additions & 229 deletions
This file was deleted.

edsnlp/pipes/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,5 @@
8484
from .trainable.embeddings.text_cnn.factory import create_component as text_cnn
8585
from .misc.split import Split as split
8686
from .misc.explode import Explode as explode
87-
from .llm.llm_markup_extractor import LlmMarkupExtractor as llm_markup_extractor
87+
from .llm.llm_markup_extractor.factory import create_component as llm_markup_extractor
88+
from .llm.llm_span_qualifier.factory import create_component as llm_span_qualifier
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .llm_span_qualifier import LlmSpanQualifier
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
from edsnlp.core import registry
1+
from edsnlp import registry
22

3-
from .llm_span_qualifier import LLMSpanClassifier
3+
from .llm_span_qualifier import LlmSpanQualifier
44

55
create_component = registry.factory.register(
66
"eds.llm_span_qualifier",
7-
)(LLMSpanClassifier)
7+
assigns=["doc.ents", "doc.spans"],
8+
)(LlmSpanQualifier)

0 commit comments

Comments
 (0)