rag
__all__ = ['RagContext', 'RagEngine']
module-attribute
RagContext
Bases: SerializableMixin
Used by RagEngine stages and module to pass context that individual modules are expected to update in the run
method.
Attributes:
Name | Type | Description |
---|---|---|
query |
str
|
Query provided by the user. |
module_configs |
dict[str, dict]
|
Dictionary of module configs. First key should be a module name and the second a dictionary of configs parameters. |
before_query |
list[str]
|
An optional list of strings to add before the query in response modules. |
after_query |
list[str]
|
An optional list of strings to add after the query in response modules. |
text_chunks |
list[TextArtifact]
|
A list of text chunks to pass around from the retrieval stage to the response stage. |
outputs |
list[BaseArtifact]
|
List of outputs from the response stage. |