Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Merge the Model, Agent and RagAgent types into single Agent type #12

Closed
cvauclair opened this issue Sep 5, 2024 · 1 comment
Closed
Assignees

Comments

@cvauclair
Copy link
Contributor

Feature Request

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.

@cvauclair cvauclair added the feat label Sep 5, 2024
@cvauclair cvauclair self-assigned this Sep 5, 2024
@0xMochan
Copy link
Contributor

Implemented by #21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants