Class: EmbeddingsWithScores
Embeddings retriever that also returns similarity scores (dspy.EmbeddingsWithScores).
URI: dspy:EmbeddingsWithScores
classDiagram
class EmbeddingsWithScores
click EmbeddingsWithScores href "../EmbeddingsWithScores/"
Embeddings <|-- EmbeddingsWithScores
click Embeddings href "../Embeddings/"
EmbeddingsWithScores : callbacks
EmbeddingsWithScores : compiled
EmbeddingsWithScores : corpus
EmbeddingsWithScores : description
EmbeddingsWithScores : embedder
EmbeddingsWithScores --> "0..1" Embedder : embedder
click Embedder href "../Embedder/"
EmbeddingsWithScores : history
EmbeddingsWithScores --> "*" LMHistoryEntry : history
click LMHistoryEntry href "../LMHistoryEntry/"
EmbeddingsWithScores : id
EmbeddingsWithScores : k
EmbeddingsWithScores : name
EmbeddingsWithScores : predictors
EmbeddingsWithScores --> "*" Predictor : predictors
click Predictor href "../Predictor/"
EmbeddingsWithScores : scores
EmbeddingsWithScores : sub_modules
EmbeddingsWithScores --> "*" Module : sub_modules
click Module href "../Module/"
Inheritance
- NamedThing
- Module
- Retriever
- Embeddings
- EmbeddingsWithScores
- Embeddings
- Retriever
- Module
Slots
| Name | Cardinality and Range | Description | Inheritance |
|---|---|---|---|
| scores | * Float |
direct | |
| embedder | 0..1 Embedder |
Embeddings | |
| corpus | * String |
In-memory document corpus | Embeddings |
| k | 0..1 Integer |
Top-k retrieval depth | Retriever |
| compiled | 0..1 Boolean |
Whether the module has been compiled by a teleprompter | Module |
| callbacks | * String |
Dotted import paths of callbacks registered on the module | Module |
| history | * LMHistoryEntry |
Per-module call history of LM requests / responses | Module |
| predictors | * Predictor |
Predictor children of a composite Module (named_predictors()) | Module |
| sub_modules | * Module |
Nested Module children of a composite Module | Module |
| 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 |
In Subsets
Identifier and Mapping Information
Annotations
| property | value |
|---|---|
| dspy_source_paths | ['dspy/retrievers/embeddings.py'] |
| dspy_source_urls | ['https://github.com/stanfordnlp/dspy/blob/main/dspy/retrievers/embeddings.py'] |
Schema Source
- from schema: https://w3id.org/lmodel/dspy
Mappings
| Mapping Type | Mapped Value |
|---|---|
| self | dspy:EmbeddingsWithScores |
| native | dspy:EmbeddingsWithScores |
LinkML Source
Direct
name: EmbeddingsWithScores
annotations:
dspy_source_paths:
tag: dspy_source_paths
value:
- dspy/retrievers/embeddings.py
dspy_source_urls:
tag: dspy_source_urls
value:
- https://github.com/stanfordnlp/dspy/blob/main/dspy/retrievers/embeddings.py
description: Embeddings retriever that also returns similarity scores (``dspy.EmbeddingsWithScores``).
in_subset:
- retrievers
from_schema: https://w3id.org/lmodel/dspy
is_a: Embeddings
slots:
- scores
Induced
name: EmbeddingsWithScores
annotations:
dspy_source_paths:
tag: dspy_source_paths
value:
- dspy/retrievers/embeddings.py
dspy_source_urls:
tag: dspy_source_urls
value:
- https://github.com/stanfordnlp/dspy/blob/main/dspy/retrievers/embeddings.py
description: Embeddings retriever that also returns similarity scores (``dspy.EmbeddingsWithScores``).
in_subset:
- retrievers
from_schema: https://w3id.org/lmodel/dspy
is_a: Embeddings
attributes:
scores:
name: scores
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: EmbeddingsWithScores
domain_of:
- EmbeddingsWithScores
range: float
multivalued: true
embedder:
name: embedder
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: EmbeddingsWithScores
domain_of:
- KNN
- KNNFewShot
- Embeddings
range: Embedder
inlined: true
corpus:
name: corpus
description: In-memory document corpus.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: EmbeddingsWithScores
domain_of:
- Embeddings
range: string
multivalued: true
k:
name: k
description: Top-k retrieval depth.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: EmbeddingsWithScores
domain_of:
- Retriever
range: integer
minimum_value: 1
compiled:
name: compiled
description: Whether the module has been compiled by a teleprompter.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
ifabsent: boolean(False)
owner: EmbeddingsWithScores
domain_of:
- Module
range: boolean
callbacks:
name: callbacks
description: Dotted import paths of callbacks registered on the module.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: EmbeddingsWithScores
domain_of:
- BaseLM
- Adapter
- Module
- Settings
range: string
multivalued: true
history:
name: history
description: Per-module call history of LM requests / responses.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: EmbeddingsWithScores
domain_of:
- BaseLM
- Module
range: LMHistoryEntry
multivalued: true
inlined: true
inlined_as_list: true
predictors:
name: predictors
description: Predictor children of a composite Module (named_predictors()).
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: EmbeddingsWithScores
domain_of:
- Module
range: Predictor
multivalued: true
inlined: true
inlined_as_list: true
sub_modules:
name: sub_modules
description: Nested Module children of a composite Module.
from_schema: https://w3id.org/lmodel/dspy
rank: 1000
owner: EmbeddingsWithScores
domain_of:
- Module
range: Module
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: EmbeddingsWithScores
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: EmbeddingsWithScores
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: EmbeddingsWithScores
domain_of:
- NamedThing
- LMToolSpec
range: string