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: get and set prompts mixin #1391

Merged
merged 6 commits into from
Oct 1, 2024

Conversation

shahules786
Copy link
Member

@shahules786 shahules786 commented Oct 1, 2024

from ragas.experimental.testset.simulators import AbstractQuestionSimulator
simulator = AbstractQuestionSimulator()
prompts = simulator.get_prompts()
prompts['common_theme_prompt'].instruction += "\n Ouptut only JSON"
simulator.set_prompts(common_theme_prompt=prompts['common_theme_prompt'])```

@shahules786 shahules786 marked this pull request as ready for review October 1, 2024 05:28
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Oct 1, 2024
@shahules786 shahules786 changed the title feat: get and set prompts feat: get and set prompts for test generation Oct 1, 2024
Copy link
Member

@jjmachan jjmachan left a comment

Choose a reason for hiding this comment

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

This should be a mixin because we are using this in 3 places in total.

take a look at this to see it in action: https://www.perplexity.ai/search/write-me-a-tutorial-on-python-Bxu55LqmS1ivIV8pRW8TSw

@jjmachan
Copy link
Member

jjmachan commented Oct 1, 2024

if you make it a mixin, add it to metrics too

@shahules786
Copy link
Member Author

This should be a mixin because we are using this in 3 places in total.

take a look at this to see it in action: https://www.perplexity.ai/search/write-me-a-tutorial-on-python-Bxu55LqmS1ivIV8pRW8TSw

I see, thanks I didn't know that this is the use of Mixins.

@explodinggradients explodinggradients deleted a comment from jjmachan Oct 1, 2024
Copy link
Member

@jjmachan jjmachan left a comment

Choose a reason for hiding this comment

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

have to remove transforms/base.py

@explodinggradients explodinggradients deleted a comment from jjmachan Oct 1, 2024
@shahules786 shahules786 changed the title feat: get and set prompts for test generation feat: get and set prompts mixin Oct 1, 2024
@jjmachan jjmachan merged commit 3764c6c into explodinggradients:main Oct 1, 2024
14 of 15 checks passed
shahules786 added a commit to shahules786/ragas that referenced this pull request Oct 2, 2024
```python

from ragas.experimental.testset.simulators import AbstractQuestionSimulator
simulator = AbstractQuestionSimulator()
prompts = simulator.get_prompts()
prompts['common_theme_prompt'].instruction += "\n Ouptut only JSON"
simulator.set_prompts(common_theme_prompt=prompts['common_theme_prompt'])```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants