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 #67

Open
berkecanrizai opened this issue Jul 22, 2024 · 0 comments
Open

Allow setting query transformers in the BaseRAGQA #67

berkecanrizai opened this issue Jul 22, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@berkecanrizai
Copy link
Contributor

There are already set of prompts such as prompt_query_rewrite and prompt_query_rewrite_hyde, allow setting the query transformation behaviour in the BaseRAGQA initialization. It can default to None to skip it.

@berkecanrizai berkecanrizai added enhancement New feature or request good first issue Good for newcomers labels Jul 22, 2024
vishwamartur added a commit to vishwamartur/pathway that referenced this issue Dec 10, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant