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

Allow setting query transformers in the BaseRAGQA #76

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vishwamartur
Copy link

Related to #67

Add query transformation behavior to BaseRAGQuestionAnswerer initialization.

  • python/pathway/xpacks/llm/question_answering.py

    • Add query_rewrite_method parameter to BaseRAGQuestionAnswerer initialization.
    • Update answer_query method to apply the selected query transformation prompt.
    • Use query_rewrite_method to select the appropriate query transformation prompt.
    • Add query_rewrite_method parameter to GeometricRAGQuestionAnswerer initialization.
    • Update answer_query method in GeometricRAGQuestionAnswerer to apply the selected query transformation prompt.
  • python/pathway/xpacks/llm/tests/test_rag.py

    • Add tests to verify the new functionality of query_rewrite_method.
    • Test different values of query_rewrite_method parameter.

Related to pathwaycom#67

Add query transformation behavior to `BaseRAGQuestionAnswerer` initialization.

* **`python/pathway/xpacks/llm/question_answering.py`**
  - Add `query_rewrite_method` parameter to `BaseRAGQuestionAnswerer` initialization.
  - Update `answer_query` method to apply the selected query transformation prompt.
  - Use `query_rewrite_method` to select the appropriate query transformation prompt.
  - Add `query_rewrite_method` parameter to `GeometricRAGQuestionAnswerer` initialization.
  - Update `answer_query` method in `GeometricRAGQuestionAnswerer` to apply the selected query transformation prompt.

* **`python/pathway/xpacks/llm/tests/test_rag.py`**
  - Add tests to verify the new functionality of `query_rewrite_method`.
  - Test different values of `query_rewrite_method` parameter.
@CLAassistant
Copy link

CLAassistant commented Dec 10, 2024

CLA assistant check
All committers have signed the CLA.

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.

2 participants