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

Adaptive RAG with Mistral and Pathway notebook #31

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

Conversation

avriiil
Copy link

@avriiil avriiil commented Apr 22, 2024

This PR adds a notebook showcasing Adaptive RAG with Mistral and Pathway. It shows how you can dynamically adapt the number of documents in a RAG prompt using feedback from the LLM. This can give you significant cost reduction of RAG LLM question answering pipelines while maintaining good accuracy. Mistral makes it easy to run Adaptive RAG locally with ollama or remotely using the Mistral API.

Thoughts and feedback welcome :)

@sophiamyang
Copy link
Collaborator

Hi @avriiil thanks for the PR! Could you move the notebook to the third-party folder and could you make sure the notebook runs on colab? Thanks!

"outputs": [],
"source": [
"# # Uncomment and run if you need to install Pathway and Mistral packages\n",
"# !pip install -U --prefer-binary pathway~= 0.9.0 \n",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe "pathway~=0.9.0" has to be in between ", also run_local needs to be declared even if It's False.

@avriiil
Copy link
Author

avriiil commented Jun 11, 2024

@sophiamyang -- changes have been made! I will update the Colab link when the PR is merged so it will be generated from the code on main.

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.

3 participants