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: Add RAG LLMReranker #784

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

feat: Add RAG LLMReranker #784

wants to merge 12 commits into from

Conversation

@ishaansehgal99 ishaansehgal99 changed the title feat: Add Reranker feat: Add RAG reranker Dec 17, 2024
@ishaansehgal99 ishaansehgal99 changed the title feat: Add RAG reranker feat: Add RAG Reranker Dec 17, 2024
@ishaansehgal99 ishaansehgal99 changed the title feat: Add RAG Reranker feat: Add RAG LLMReranker Dec 17, 2024
"""
=========================================================================
"""

Copy link
Collaborator

Choose a reason for hiding this comment

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

low priority: we can reorg these params to cli args and using structured params instead of raw key-value dict.

@zhuangqh
Copy link
Collaborator

unit test fails

__________ ERROR collecting presets/ragengine/tests/api/test_main.py ___________
presets/ragengine/tests/api/test_main.py:8: in <module>
    from ragengine.main import app, vector_store_handler, rag_ops
presets/ragengine/main.py:5: in <module>
    from vector_store_manager.manager import VectorStoreManager
presets/ragengine/vector_store_manager/manager.py:7: in <module>
    from ragengine.vector_store.base import BaseVectorStore
presets/ragengine/vector_store/base.py:25: in <module>
    class BaseVectorStore(ABC):
presets/ragengine/vector_store/base.py:96: in BaseVectorStore
    rerank_params: Optional[Dict] = None
E   NameError: name 'Optional' is not defined
___ ERROR collecting presets/ragengine/tests/vector_store/test_base_store.py ___
presets/ragengine/tests/vector_store/test_base_store.py:9: in <module>
    from ragengine.vector_store.base import BaseVectorStore
presets/ragengine/vector_store/base.py:25: in <module>
    class BaseVectorStore(ABC):
presets/ragengine/vector_store/base.py:96: in BaseVectorStore
    rerank_params: Optional[Dict] = None
E   NameError: name 'Optional' is not defined
_ ERROR collecting presets/ragengine/tests/vector_store/test_chromadb_store.py _
presets/ragengine/tests/vector_store/test_chromadb_store.py:9: in <module>
    from ragengine.tests.vector_store.test_base_store import BaseVectorStoreTest
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
../../../.local/lib/python3.12/site-packages/_pytest/assertion/rewrite.py:184: in exec_module
    exec(co, module.__dict__)
presets/ragengine/tests/vector_store/test_base_store.py:9: in <module>
    from ragengine.vector_store.base import BaseVectorStore
presets/ragengine/vector_store/base.py:25: in <module>
    class BaseVectorStore(ABC):
presets/ragengine/vector_store/base.py:96: in BaseVectorStore
    rerank_params: Optional[Dict] = None
E   NameError: name 'Optional' is not defined
__ ERROR collecting presets/ragengine/tests/vector_store/test_faiss_store.py ___
presets/ragengine/tests/vector_store/test_faiss_store.py:8: in <module>
    from ragengine.tests.vector_store.test_base_store import BaseVectorStoreTest
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
../../../.local/lib/python3.12/site-packages/_pytest/assertion/rewrite.py:184: in exec_module
    exec(co, module.__dict__)
presets/ragengine/tests/vector_store/test_base_store.py:9: in <module>
    from ragengine.vector_store.base import BaseVectorStore
presets/ragengine/vector_store/base.py:25: in <module>
    class BaseVectorStore(ABC):
presets/ragengine/vector_store/base.py:96: in BaseVectorStore
    rerank_params: Optional[Dict] = None
E   NameError: name 'Optional' is not defined

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

see 24 files with indirect coverage changes

"query": "what is the capital of france?",
"top_k": 5,
"llm_params": {"temperature": 0.7},
"rerank_params": {"top_n": top_n}
Copy link
Collaborator

Choose a reason for hiding this comment

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

What are the list of parameters that we can change here?

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.

4 participants