Class: Example
Flexible data container for DSPy examples (trainset rows). Maps to dspy.Example.
URI: dspy:Example
classDiagram
class Example
click Example href "../Example/"
NamedThing <|-- Example
click NamedThing href "../NamedThing/"
Example <|-- Prediction
click Prediction href "../Prediction/"
Example : description
Example : fields
Example --> "*" ExampleField : fields
click ExampleField href "../ExampleField/"
Example : id
Example : input_keys
Example : name
Inheritance
- NamedThing
- Example
Class Properties
| Property | Value |
|---|---|
| Class URI | dspy:Example |
Slots
| Name | Cardinality and Range | Description | Inheritance |
|---|---|---|---|
| fields | * ExampleField |
Named scalar fields carried by an Example / Prediction |
direct |
| input_keys | * String |
Subset of fields flagged as inputs via ``with_inputs( |
direct |
| id | 1 Identifier |
Stable opaque identifier for an instance | NamedThing |
| name | 0..1 String |
Short human-readable name | NamedThing |
| description | 0..1 String |
Free-form description | NamedThing |
Usages
In Subsets
Identifier and Mapping Information
Annotations
| property | value |
|---|---|
| dspy_source_paths | ['dspy/primitives/example.py'] |
| dspy_source_urls | ['https://github.com/stanfordnlp/dspy/blob/main/dspy/primitives/example.py'] |
Schema Source
- from schema: https://w3id.org/lmodel/dspy
Mappings
| Mapping Type | Mapped Value |
|---|---|
| self | dspy:Example |
| native | dspy:Example |
| related | uco_core:UcoObject |
LinkML Source
Direct
name: Example
annotations:
dspy_source_paths:
tag: dspy_source_paths
value:
- dspy/primitives/example.py
dspy_source_urls:
tag: dspy_source_urls
value:
- https://github.com/stanfordnlp/dspy/blob/main/dspy/primitives/example.py
description: Flexible data container for DSPy examples (trainset rows). Maps to ``dspy.Example``.
in_subset:
- core
from_schema: https://w3id.org/lmodel/dspy
related_mappings:
- uco_core:UcoObject
is_a: NamedThing
slots:
- fields
- input_keys
class_uri: dspy:Example
Induced
name: Example
annotations:
dspy_source_paths:
tag: dspy_source_paths
value:
- dspy/primitives/example.py
dspy_source_urls:
tag: dspy_source_urls
value:
- https://github.com/stanfordnlp/dspy/blob/main/dspy/primitives/example.py
description: Flexible data container for DSPy examples (trainset rows). Maps to ``dspy.Example``.
in_subset:
- core
from_schema: https://w3id.org/lmodel/dspy
related_mappings:
- uco_core:UcoObject
is_a: NamedThing
attributes:
fields:
name: fields
description: Named scalar fields carried by an ``Example`` / ``Prediction``.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: Example
domain_of:
- Example
range: ExampleField
multivalued: true
inlined: true
inlined_as_list: true
input_keys:
name: input_keys
description: Subset of ``fields`` flagged as inputs via ``with_inputs(...)``.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: Example
domain_of:
- Example
range: string
multivalued: true
id:
name: id
description: Stable opaque identifier for an instance.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
slot_uri: schema:identifier
identifier: true
owner: Example
domain_of:
- NamedThing
range: Identifier
required: true
name:
name: name
description: Short human-readable name.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
slot_uri: rdfs:label
owner: Example
domain_of:
- NamedThing
- LMToolCallPart
- LMMessage
- LMToolSpec
range: string
description:
name: description
description: Free-form description.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
slot_uri: dct:description
owner: Example
domain_of:
- NamedThing
- LMToolSpec
range: string
class_uri: dspy:Example