Skip to content

Class: Retriever

Abstract retrieval module.

  • NOTE: this is an abstract class and should not be instantiated directly

URI: dspy:Retriever

 classDiagram
    class Retriever
    click Retriever href "../Retriever/"
      Module <|-- Retriever
        click Module href "../Module/"


      Retriever <|-- Retrieve
        click Retrieve href "../Retrieve/"
      Retriever <|-- Embeddings
        click Embeddings href "../Embeddings/"
      Retriever <|-- ColBERTv2
        click ColBERTv2 href "../ColBERTv2/"


      Retriever : callbacks

      Retriever : compiled

      Retriever : description

      Retriever : history





        Retriever --> "*" LMHistoryEntry : history
        click LMHistoryEntry href "../LMHistoryEntry/"



      Retriever : id

      Retriever : k

      Retriever : name

      Retriever : predictors





        Retriever --> "*" Predictor : predictors
        click Predictor href "../Predictor/"



      Retriever : sub_modules





        Retriever --> "*" Module : sub_modules
        click Module href "../Module/"



Inheritance

Slots

Name Cardinality and Range Description Inheritance
k 0..1
Integer
Top-k retrieval depth direct
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

Usages

used by used in type used
Settings rm range Retriever

In Subsets

Identifier and Mapping Information

Schema Source

Mappings

Mapping Type Mapped Value
self dspy:Retriever
native dspy:Retriever

LinkML Source

Direct

name: Retriever
description: Abstract retrieval module.
in_subset:
- retrievers
from_schema: https://w3id.org/lmodel/dspy
is_a: Module
abstract: true
slots:
- k

Induced

name: Retriever
description: Abstract retrieval module.
in_subset:
- retrievers
from_schema: https://w3id.org/lmodel/dspy
is_a: Module
abstract: true
attributes:
  k:
    name: k
    description: Top-k retrieval depth.
    from_schema: https://w3id.org/lmodel/dspy
    rank: 1000
    owner: Retriever
    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: Retriever
    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: Retriever
    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: Retriever
    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: Retriever
    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: Retriever
    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: Retriever
    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: Retriever
    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: Retriever
    domain_of:
    - NamedThing
    - LMToolSpec
    range: string