base
Base classes for augmentation steps.
Classes:
-
AugmentedBase–Base class for all augmentation steps.
AugmentedBase
AugmentedBase(
model_name: Optional[str] = None,
db: DBBase | None = None,
top_k: Optional[int] = None,
api_key: str = '',
api_params: dict[str, Any] | None = None,
cache: Cache | None = None,
logs: dict[str, Any] | None = None,
)
Bases: StepBase
Base class for all augmentation steps.
Methods:
-
apply–Apply attached configuration to the step.
-
get_embedding–Retrieve embeddings for the given texts.
-
process–Run augmentation against the current pipeline content.
-
search–Search for the most relevant documents.
Source code in src/rago/augmented/base.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
apply
apply(parameters: Any) -> None
Apply attached configuration to the step.
Source code in src/rago/base.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | |
get_embedding
get_embedding(content: list[str]) -> EmbeddingType
Retrieve embeddings for the given texts.
Source code in src/rago/augmented/base.py
127 128 129 | |
process
Run augmentation against the current pipeline content.
Source code in src/rago/augmented/base.py
154 155 156 157 158 159 160 161 162 | |
search
abstractmethod
search(
query: str, documents: Any, top_k: int = 0
) -> list[str]
Search for the most relevant documents.
Source code in src/rago/augmented/base.py
131 132 133 | |