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 Megaservice support for MMRAG - MultimodalRAGQnAWithVideos usecase #626

Merged
merged 55 commits into from
Sep 6, 2024

Conversation

tileintel
Copy link
Contributor

@tileintel tileintel commented Sep 5, 2024

Description

Add support/gateway for MMRAG MultimodalRAGQnAWithVideos usecase.
The new MultimodalRAGQnAWithVideosGateway is initialized with 2 ServiceOrchestrators. One is to handle MMRAG for the query that requires multimodal retrieval results. The second one is simply LVM ServiceOrchestrator to handle follow-up queries that do not require multimodal retrieval results.

Issues

RFC: https://github.com/opea-project/docs/pull/49/files
Issue: opea-project/GenAIExamples#358

Type of change

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

  • Bug fix (non-breaking change which fixes an issue)
  • [x ] New feature (non-breaking change which adds new functionality)
  • Breaking change (fix or feature that would break existing design and interface)
  • Others (enhancement, documentation, validation, etc.)

Dependencies

None

Tests

We have provided 7 unittests in tests/cores/mega/test_multimodalrag_qna_with_videos_gateway.py: 2 of them test the two ServiceOrchestrator used in the new gateway, and the other 5 test the new gateway for different different scenarios

tileintel and others added 30 commits August 29, 2024 22:00
Signed-off-by: Tiep Le <[email protected]>
Signed-off-by: siddhivelankar23 <[email protected]>
Signed-off-by: siddhivelankar23 <[email protected]>
Signed-off-by: siddhivelankar23 <[email protected]>
Signed-off-by: siddhivelankar23 <[email protected]>
Signed-off-by: siddhivelankar23 <[email protected]>
Signed-off-by: siddhivelankar23 <[email protected]>
Signed-off-by: sjagtap1803 <[email protected]>
Signed-off-by: sjagtap1803 <[email protected]>
Signed-off-by: sjagtap1803 <[email protected]>
Signed-off-by: sjagtap1803 <[email protected]>
Signed-off-by: sjagtap1803 <[email protected]>
Signed-off-by: siddhivelankar23 <[email protected]>
Signed-off-by: siddhivelankar23 <[email protected]>
Signed-off-by: siddhivelankar23 <[email protected]>
Copy link

codecov bot commented Sep 5, 2024

Codecov Report

Attention: Patch coverage is 76.59574% with 22 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
comps/cores/mega/gateway.py 76.34% 22 Missing ⚠️
Files with missing lines Coverage Δ
comps/cores/mega/constants.py 98.21% <100.00%> (+0.03%) ⬆️
comps/cores/mega/gateway.py 35.90% <76.34%> (+13.28%) ⬆️

... and 1 file with indirect coverage changes

@XuhuiRen
Copy link
Collaborator

XuhuiRen commented Sep 6, 2024

what is the difference with #606?

@tileintel
Copy link
Contributor Author

tileintel commented Sep 6, 2024

what is the difference with #606?

This PR is developed starting from #606. So can you please click merge #606 first, and then review this PR? Then this PR will be much less file changed. Sorry for the confusion. There is no change from #606 in this PR.

@kevinintel kevinintel merged commit 99be1bd into opea-project:main Sep 6, 2024
11 checks passed
sharanshirodkar7 pushed a commit to predictionguard/GenAIComps that referenced this pull request Sep 11, 2024
opea-project#626)

* updates

Signed-off-by: Tiep Le <[email protected]>

* cosmetic

Signed-off-by: siddhivelankar23 <[email protected]>

* update redis schema

Signed-off-by: siddhivelankar23 <[email protected]>

* update multimodal config and docker compose retriever

Signed-off-by: siddhivelankar23 <[email protected]>

* update requirements

Signed-off-by: siddhivelankar23 <[email protected]>

* update retriever redis

Signed-off-by: siddhivelankar23 <[email protected]>

* multimodal retriever implementation

Signed-off-by: siddhivelankar23 <[email protected]>

* test for multimodal retriever

Signed-off-by: siddhivelankar23 <[email protected]>

* include prompt preparation for multimodal rag on videos application

Signed-off-by: sjagtap1803 <[email protected]>

* fix template

Signed-off-by: sjagtap1803 <[email protected]>

* add test for llava for mm_rag_on_videos

Signed-off-by: sjagtap1803 <[email protected]>

* update test

Signed-off-by: sjagtap1803 <[email protected]>

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

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

* first update on gateaway

Signed-off-by: sjagtap1803 <[email protected]>

* fix index not found

Signed-off-by: sjagtap1803 <[email protected]>

* add LVMSearchedMultimodalDoc

Signed-off-by: sjagtap1803 <[email protected]>

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

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

* implement gateway for MultimodalRagQnAWithVideos

Signed-off-by: siddhivelankar23 <[email protected]>

* remove INDEX_SCHEMA

Signed-off-by: siddhivelankar23 <[email protected]>

* update MultimodalRAGQnAWithVideosGateway with 2 megaservices

Signed-off-by: sjagtap1803 <[email protected]>

* revise folder structure to comps/retrievers/langchain/redis_multimodal

Signed-off-by: siddhivelankar23 <[email protected]>

* update test

Signed-off-by: siddhivelankar23 <[email protected]>

* add unittest for multimodalrag_qna_with_videos_gateway

Signed-off-by: siddhivelankar23 <[email protected]>

* update test mmrag qna with videos

Signed-off-by: Tiep Le <[email protected]>

* change port of redis to resolve CI test

Signed-off-by: siddhivelankar23 <[email protected]>

* update test

Signed-off-by: siddhivelankar23 <[email protected]>

* update lvms test

Signed-off-by: siddhivelankar23 <[email protected]>

* update test

Signed-off-by: siddhivelankar23 <[email protected]>

* update test

Signed-off-by: siddhivelankar23 <[email protected]>

* update test for multimodal rag qna with videos gateway

Signed-off-by: siddhivelankar23 <[email protected]>

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

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

* add more test to increase coverage

Signed-off-by: Tiep Le <[email protected]>

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

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

* cosmetic

Signed-off-by: Tiep Le <[email protected]>

* add more test

Signed-off-by: Tiep Le <[email protected]>

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

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

* update name of gateway

Signed-off-by: Tiep Le <[email protected]>

---------

Signed-off-by: Tiep Le <[email protected]>
Signed-off-by: siddhivelankar23 <[email protected]>
Signed-off-by: sjagtap1803 <[email protected]>
Co-authored-by: siddhivelankar23 <[email protected]>
Co-authored-by: sjagtap1803 <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sihan Chen <[email protected]>
sharanshirodkar7 pushed a commit to predictionguard/GenAIComps that referenced this pull request Sep 11, 2024
…opea-project#626)

* updates

Signed-off-by: Tiep Le <[email protected]>

* cosmetic

Signed-off-by: siddhivelankar23 <[email protected]>

* update redis schema

Signed-off-by: siddhivelankar23 <[email protected]>

* update multimodal config and docker compose retriever

Signed-off-by: siddhivelankar23 <[email protected]>

* update requirements

Signed-off-by: siddhivelankar23 <[email protected]>

* update retriever redis

Signed-off-by: siddhivelankar23 <[email protected]>

* multimodal retriever implementation

Signed-off-by: siddhivelankar23 <[email protected]>

* test for multimodal retriever

Signed-off-by: siddhivelankar23 <[email protected]>

* include prompt preparation for multimodal rag on videos application

Signed-off-by: sjagtap1803 <[email protected]>

* fix template

Signed-off-by: sjagtap1803 <[email protected]>

* add test for llava for mm_rag_on_videos

Signed-off-by: sjagtap1803 <[email protected]>

* update test

Signed-off-by: sjagtap1803 <[email protected]>

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

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

* first update on gateaway

Signed-off-by: sjagtap1803 <[email protected]>

* fix index not found

Signed-off-by: sjagtap1803 <[email protected]>

* add LVMSearchedMultimodalDoc

Signed-off-by: sjagtap1803 <[email protected]>

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

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

* implement gateway for MultimodalRagQnAWithVideos

Signed-off-by: siddhivelankar23 <[email protected]>

* remove INDEX_SCHEMA

Signed-off-by: siddhivelankar23 <[email protected]>

* update MultimodalRAGQnAWithVideosGateway with 2 megaservices

Signed-off-by: sjagtap1803 <[email protected]>

* revise folder structure to comps/retrievers/langchain/redis_multimodal

Signed-off-by: siddhivelankar23 <[email protected]>

* update test

Signed-off-by: siddhivelankar23 <[email protected]>

* add unittest for multimodalrag_qna_with_videos_gateway

Signed-off-by: siddhivelankar23 <[email protected]>

* update test mmrag qna with videos

Signed-off-by: Tiep Le <[email protected]>

* change port of redis to resolve CI test

Signed-off-by: siddhivelankar23 <[email protected]>

* update test

Signed-off-by: siddhivelankar23 <[email protected]>

* update lvms test

Signed-off-by: siddhivelankar23 <[email protected]>

* update test

Signed-off-by: siddhivelankar23 <[email protected]>

* update test

Signed-off-by: siddhivelankar23 <[email protected]>

* update test for multimodal rag qna with videos gateway

Signed-off-by: siddhivelankar23 <[email protected]>

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

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

* add more test to increase coverage

Signed-off-by: Tiep Le <[email protected]>

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

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

* cosmetic

Signed-off-by: Tiep Le <[email protected]>

* add more test

Signed-off-by: Tiep Le <[email protected]>

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

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

* update name of gateway

Signed-off-by: Tiep Le <[email protected]>

---------

Signed-off-by: Tiep Le <[email protected]>
Signed-off-by: siddhivelankar23 <[email protected]>
Signed-off-by: sjagtap1803 <[email protected]>
Co-authored-by: siddhivelankar23 <[email protected]>
Co-authored-by: sjagtap1803 <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sihan Chen <[email protected]>
Signed-off-by: sharanshirodkar7 <[email protected]>
lkk12014402 pushed a commit that referenced this pull request Sep 19, 2024
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.

7 participants