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

Would Reversing Few-Shot Prompt Placement in chatreadretrieveread.py Improve Accuracy? #2314

Open
baku2san opened this issue Jan 31, 2025 · 2 comments
Labels
enhancement New feature or request rag Related to RAG flow/logic/approaches

Comments

@baku2san
Copy link

In the chatreadretrieveread.py file, the few-shot prompt is currently applied to the query creation side, but not to the response build_message. Would reversing this placement improve accuracy? I am considering submitting a Pull Request and would appreciate your feedback.

Current Few-Shot Prompt Placement: Link to current few-shot prompt

Proposed Placement: Link to proposed placement

the few shots setting
proposed placement

@pamelafox
Copy link
Collaborator

Hm, the few shots are currently only to provide examples of query rewriting. If we added few shots to the question-answering, they would be different answers. Is that what you mean?
If so, yes, we could consider that. I'd want to see the result of evaluations to see if its worth the additional tokens, however.

@pamelafox pamelafox added enhancement New feature or request rag Related to RAG flow/logic/approaches labels Feb 5, 2025
@baku2san
Copy link
Author

baku2san commented Feb 8, 2025

What kind of evaluation are you looking for?
Does the current test include an evaluation? If so, I would like to create a pull request with the test results in the swapped state. In that case, I will not address the test.jsonfile but will make corrections if the direction is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request rag Related to RAG flow/logic/approaches
Projects
None yet
Development

No branches or pull requests

2 participants