Class: Signature
Declarative input/output contract for a DSPy predictor (dspy.Signature).
URI: dspy:Signature
classDiagram
class Signature
click Signature href "../Signature/"
NamedThing <|-- Signature
click NamedThing href "../NamedThing/"
Signature : description
Signature : id
Signature : input_fields
Signature --> "*" SignatureField : input_fields
click SignatureField href "../SignatureField/"
Signature : instructions
Signature : name
Signature : output_fields
Signature --> "*" SignatureField : output_fields
click SignatureField href "../SignatureField/"
Inheritance
- NamedThing
- Signature
Class Properties
| Property | Value |
|---|---|
| Class URI | dspy:Signature |
Slots
| Name | Cardinality and Range | Description | Inheritance |
|---|---|---|---|
| instructions | 0..1 String |
Free-form instructions string carried on a Signature (its __doc__) |
direct |
| input_fields | * SignatureField |
Ordered list of input fields on a Signature | direct |
| output_fields | * SignatureField |
Ordered list of output fields on a Signature | 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
| used by | used in | type | used |
|---|---|---|---|
| Completions | signature | range | Signature |
| Predictor | signature | range | Signature |
| Predict | signature | range | Signature |
| ChainOfThought | signature | range | Signature |
| MultiChainComparison | signature | range | Signature |
| ReAct | signature | range | Signature |
| ReActV2 | signature | range | Signature |
| ProgramOfThought | signature | range | Signature |
| CodeAct | signature | range | Signature |
In Subsets
Identifier and Mapping Information
Annotations
| property | value |
|---|---|
| dspy_source_paths | ['dspy/signatures/signature.py'] |
| dspy_source_urls | ['https://github.com/stanfordnlp/dspy/blob/main/dspy/signatures/signature.py'] |
Schema Source
- from schema: https://w3id.org/lmodel/dspy
Mappings
| Mapping Type | Mapped Value |
|---|---|
| self | dspy:Signature |
| native | dspy:Signature |
| related | iso22989:NLPComponentType |
| close | mellea:ApiModelSpec |
LinkML Source
Direct
name: Signature
annotations:
dspy_source_paths:
tag: dspy_source_paths
value:
- dspy/signatures/signature.py
dspy_source_urls:
tag: dspy_source_urls
value:
- https://github.com/stanfordnlp/dspy/blob/main/dspy/signatures/signature.py
description: Declarative input/output contract for a DSPy predictor (``dspy.Signature``).
in_subset:
- core
from_schema: https://w3id.org/lmodel/dspy
close_mappings:
- mellea:ApiModelSpec
related_mappings:
- iso22989:NLPComponentType
is_a: NamedThing
slots:
- instructions
- input_fields
- output_fields
class_uri: dspy:Signature
Induced
name: Signature
annotations:
dspy_source_paths:
tag: dspy_source_paths
value:
- dspy/signatures/signature.py
dspy_source_urls:
tag: dspy_source_urls
value:
- https://github.com/stanfordnlp/dspy/blob/main/dspy/signatures/signature.py
description: Declarative input/output contract for a DSPy predictor (``dspy.Signature``).
in_subset:
- core
from_schema: https://w3id.org/lmodel/dspy
close_mappings:
- mellea:ApiModelSpec
related_mappings:
- iso22989:NLPComponentType
is_a: NamedThing
attributes:
instructions:
name: instructions
description: Free-form instructions string carried on a Signature (its ``__doc__``).
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: Signature
domain_of:
- Signature
range: string
input_fields:
name: input_fields
description: Ordered list of input fields on a Signature.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: Signature
domain_of:
- Signature
range: SignatureField
multivalued: true
inlined: true
inlined_as_list: true
output_fields:
name: output_fields
description: Ordered list of output fields on a Signature.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: Signature
domain_of:
- Signature
range: SignatureField
multivalued: true
inlined: true
inlined_as_list: 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: Signature
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: Signature
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: Signature
domain_of:
- NamedThing
- LMToolSpec
range: string
class_uri: dspy:Signature