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

Add RagAgentDocGrader to agent comp #480

Merged
merged 28 commits into from
Aug 19, 2024

Conversation

minmin-intel
Copy link
Collaborator

Description

Add a new agent strategy for agentic RAG

Issues

n/a.

Type of change

List the type of change like below. Please delete options that are not relevant.

  • New feature (non-breaking change which adds new functionality)

Dependencies

Need OpenAI LLM for difficult queries. Simple queries can be solved by open-source LLMs.

Tests

Unit test in GenAIComps/tests/

@minmin-intel
Copy link
Collaborator Author

@xuechendi @XuhuiRen Please review. Thanks!

pre-commit-ci bot and others added 3 commits August 13, 2024 18:25
@xuechendi
Copy link
Collaborator

The PR looks good to me, I think we should replace agentic Rag with DocGrader instead of creating a new one. These two looks really similiar, and seems DocGrader is also working on non-openAI API, so do we still need to keep both?

@minmin-intel
Copy link
Collaborator Author

@xuechendi Deleted the old agentic_rag strategy

Copy link
Collaborator

@xuechendi xuechendi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xuechendi xuechendi linked an issue Aug 15, 2024 that may be closed by this pull request
@XuhuiRen
Copy link
Collaborator

what is the difference between "TextGrader" and "DocumentGrader"? should be better give some introduction in the readme

@minmin-intel
Copy link
Collaborator Author

@XuhuiRen I added description of DocumentGrader and TextGenerator in the readme in the docgrader subfolder.

@minmin-intel
Copy link
Collaborator Author

Tests with OpenAI LLMs passed on my system. See screen shot below. @chensuyue Let me know if this is sufficient, or you would want me to test OpenAI LLM again in CICD.
image

@minmin-intel
Copy link
Collaborator Author

@XuhuiRen have changed the docgrader to rag_agent, and I have updated the overall README and the README in the strategy/ragagent/ subfolder, describing the rag agent. The plan is to iterate upon the ragagent strategy if we develop more performant rag agents in future.

@chensuyue
Copy link
Collaborator

Tests with OpenAI LLMs passed on my system. See screen shot below. @chensuyue Let me know if this is sufficient, or you would want me to test OpenAI LLM again in CICD. image

To make sure the function always work, we must add the test into CI/CD, in case it is impact by other PRs.

@chensuyue chensuyue added this to the v0.9 milestone Aug 17, 2024
@minmin-intel minmin-intel merged commit 368c833 into opea-project:main Aug 19, 2024
8 checks passed
srinarayan-srikanthan pushed a commit to siddhivelankar23/GenAIComps that referenced this pull request Aug 21, 2024
* set hf_hub to 0.24.0

* add docgrader to agent strategy openai llm code passed

* add nonstreaming output for agent

* add react langgraph and tests

* fix react langchain bug

Signed-off-by: minmin-intel <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix test script

Signed-off-by: minmin-intel <[email protected]>

* fix bug in test script

Signed-off-by: minmin-intel <[email protected]>

* update readme and rm old agentic-rag strategy

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update test and docgrader readme

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix bug in test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update rag agent strategy name and update readme

Signed-off-by: minmin-intel <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update test

Signed-off-by: minmin-intel <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: minmin-intel <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
chensuyue pushed a commit that referenced this pull request Aug 21, 2024
* set hf_hub to 0.24.0

* add docgrader to agent strategy openai llm code passed

* add nonstreaming output for agent

* add react langgraph and tests

* fix react langchain bug

Signed-off-by: minmin-intel <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix test script

Signed-off-by: minmin-intel <[email protected]>

* fix bug in test script

Signed-off-by: minmin-intel <[email protected]>

* update readme and rm old agentic-rag strategy

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update test and docgrader readme

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix bug in test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update rag agent strategy name and update readme

Signed-off-by: minmin-intel <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update test

Signed-off-by: minmin-intel <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: minmin-intel <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

(cherry picked from commit 368c833)
Signed-off-by: chensuyue <[email protected]>
tileintel pushed a commit to siddhivelankar23/GenAIComps that referenced this pull request Aug 22, 2024
* set hf_hub to 0.24.0

* add docgrader to agent strategy openai llm code passed

* add nonstreaming output for agent

* add react langgraph and tests

* fix react langchain bug

Signed-off-by: minmin-intel <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix test script

Signed-off-by: minmin-intel <[email protected]>

* fix bug in test script

Signed-off-by: minmin-intel <[email protected]>

* update readme and rm old agentic-rag strategy

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update test and docgrader readme

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix bug in test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update rag agent strategy name and update readme

Signed-off-by: minmin-intel <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update test

Signed-off-by: minmin-intel <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: minmin-intel <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: siddhivelankar23 <[email protected]>
sharanshirodkar7 pushed a commit to predictionguard/pg-GenAIComps that referenced this pull request Sep 3, 2024
* set hf_hub to 0.24.0

* add docgrader to agent strategy openai llm code passed

* add nonstreaming output for agent

* add react langgraph and tests

* fix react langchain bug

Signed-off-by: minmin-intel <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix test script

Signed-off-by: minmin-intel <[email protected]>

* fix bug in test script

Signed-off-by: minmin-intel <[email protected]>

* update readme and rm old agentic-rag strategy

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update test and docgrader readme

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix bug in test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update rag agent strategy name and update readme

Signed-off-by: minmin-intel <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update test

Signed-off-by: minmin-intel <[email protected]>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: minmin-intel <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

Rag Agent example RAG Agent v0.1
4 participants