You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge the Model, Agent and RagAgent types into a single Agent type.
Motivation
The Model, Agent and RagAgent types currently all work the same under the hood. The only difference between all of them is the amount of configuration each type supports, from least configurable (Model) to most configurable (RagAgent). In other words, an Agent without defined preamble, context or tools is equivalent to a Model and a RagAgent without defined vector stores is equivalent to an Agent.
Merging those types into a single, highly customizable Agent type would improve the developer experience and reduce code repetition.
Proposal
Remove the rig::model::Model (the entire rig::model module can probably be removed entirely) and rig::rag::RagAgent types.
Expand the definition of the rig::agent::Agent type to include the same parameters as the old rig::rag::RagAgent type.
Expand the rig::agent::AgentBuilder type to reflect the new parameters.
Move all RAG specific logic which can be reused easily to rig::rag module
Alternatives
Another solution could be to have a RAG system type be parametrized by any other type that implements the Prompt and/or Chat trait (e.g.: and Agent type). However, this would mean that there are two toolsets (one for the RAG system and the other for the underlying Agent) which complicates tool calling.
The text was updated successfully, but these errors were encountered:
Feature Request
Merge the
Model
,Agent
andRagAgent
types into a singleAgent
type.Motivation
The
Model
,Agent
andRagAgent
types currently all work the same under the hood. The only difference between all of them is the amount of configuration each type supports, from least configurable (Model
) to most configurable (RagAgent
). In other words, anAgent
without defined preamble, context or tools is equivalent to aModel
and aRagAgent
without defined vector stores is equivalent to anAgent
.Merging those types into a single, highly customizable
Agent
type would improve the developer experience and reduce code repetition.Proposal
rig::model::Model
(the entirerig::model
module can probably be removed entirely) andrig::rag::RagAgent
types.rig::agent::Agent
type to include the same parameters as the oldrig::rag::RagAgent
type.rig::agent::AgentBuilder
type to reflect the new parameters.rig::rag
moduleAlternatives
Another solution could be to have a RAG system type be parametrized by any other type that implements the
Prompt
and/orChat
trait (e.g.: andAgent
type). However, this would mean that there are two toolsets (one for the RAG system and the other for the underlyingAgent
) which complicates tool calling.The text was updated successfully, but these errors were encountered: