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: add Azure AI Search Integration with Mistral RAG #38

Merged
merged 10 commits into from
Jun 10, 2024

Conversation

farzad528
Copy link
Contributor

This PR introduces a new notebook azure_ai_search_rag.ipynb that demonstrates the integration of Azure AI Search with Mistral's RAG model.

In this notebook, we install the necessary packages including azure-search-documents, azure-identity, datasets, and mistralai. We then use Azure AI Search to fetch documents and Mistral's RAG model to generate responses based on the fetched documents and a user query.

This example provides a practical use case of combining Azure AI Search with Mistral's RAG model, and can serve as a starting point for developers looking to integrate these technologies in their applications. Also, note that Mistral customers can use both the Mistral API Key AND the Azure AI Studio Serverless API for Chat Completion Model Hosting.

Note, at this time Azure AI Studio does NOT support Mistral Embeddings, only the Chat Completion models (e.g. mistral-large)

@farzad528
Copy link
Contributor Author

farzad528 commented May 24, 2024

@pablocastro @chuwik plz review :)

@farzad528 farzad528 changed the title Add Azure AI Search Integration with Mistral RAG in azure_ai_search_rag.ipynb feat: add Azure AI Search Integration with Mistral RAG in azure_ai_search_rag.ipynb May 24, 2024
@farzad528 farzad528 changed the title feat: add Azure AI Search Integration with Mistral RAG in azure_ai_search_rag.ipynb feat: add Azure AI Search Integration with Mistral RAG May 24, 2024
@farzad528
Copy link
Contributor Author

farzad528 commented May 28, 2024

@sophiamyang @pandora-s-git @hrjn plz review :)

azure_ai_search_rag.ipynb Outdated Show resolved Hide resolved
Copy link

@chuwik chuwik left a comment

Choose a reason for hiding this comment

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

Left a comment to update a broken link, otherwise looking good thanks for getting this done!

@chuwik
Copy link

chuwik commented May 29, 2024

@farzad528 I still see the old link even though the comment is resolved.

@farzad528
Copy link
Contributor Author

updated

@farzad528 farzad528 requested a review from chuwik May 29, 2024 21:00
Copy link

@pablocastro pablocastro left a comment

Choose a reason for hiding this comment

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

Left a few comments, looks good to me with that feedback incorporated.

General style nit: there are many cells that contain a function that's called just once and within the same cell, not sure if you gain much in readability by doing that versus just having the body of the method be the code for the whole cell. Same for variables that have a constant assigned just to be used once within the cell.

azure_ai_search_rag.ipynb Outdated Show resolved Hide resolved
azure_ai_search_rag.ipynb Outdated Show resolved Hide resolved
azure_ai_search_rag.ipynb Outdated Show resolved Hide resolved
azure_ai_search_rag.ipynb Outdated Show resolved Hide resolved
azure_ai_search_rag.ipynb Outdated Show resolved Hide resolved
azure_ai_search_rag.ipynb Outdated Show resolved Hide resolved
azure_ai_search_rag.ipynb Outdated Show resolved Hide resolved
azure_ai_search_rag.ipynb Outdated Show resolved Hide resolved
azure_ai_search_rag.ipynb Outdated Show resolved Hide resolved
azure_ai_search_rag.ipynb Outdated Show resolved Hide resolved
@farzad528 farzad528 reopened this Jun 4, 2024
Copy link

@pablocastro pablocastro left a comment

Choose a reason for hiding this comment

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

LGTM. Left a couple of small comments. Also the readme seems to have some churn, not sure if adding an entry to the table shifted everything down (which is fine) or if you need to pull from main to pick up latest changes.

azure_ai_search_rag.ipynb Outdated Show resolved Hide resolved
@farzad528
Copy link
Contributor Author

farzad528 commented Jun 4, 2024

@fkriti @santiagxf

@sophiamyang
Copy link
Collaborator

sophiamyang commented Jun 7, 2024

why is this PR closed? @farzad528 are you going to make another one?

@farzad528
Copy link
Contributor Author

@sophiamyang sorry was just pulling latest from main!

@farzad528 farzad528 reopened this Jun 7, 2024
@sophiamyang
Copy link
Collaborator

cool does this notebook run successfully on colab and let me know when it's ready to be merged.

@farzad528
Copy link
Contributor Author

farzad528 commented Jun 7, 2024

cool does this notebook run successfully on colab and let me know when it's ready to be merged.

@sophiamyang Yes! I tested e2e on colab as well! Ready to be merged! Tysm for putting this together! Would love to share this with Azure AI customers!

@farzad528
Copy link
Contributor Author

@sophiamyang ready to merge!

@sophiamyang sophiamyang merged commit e8726ed into mistralai:main Jun 10, 2024
@sophiamyang
Copy link
Collaborator

Awesome thanks so much!

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.

None yet

4 participants