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

Add RAG Pipeline tutorial for Haystack 2.0 #257

Merged
merged 4 commits into from
Dec 6, 2023
Merged

Add RAG Pipeline tutorial for Haystack 2.0 #257

merged 4 commits into from
Dec 6, 2023

Conversation

bilgeyucel
Copy link
Contributor

No description provided.

@bilgeyucel bilgeyucel requested a review from TuanaCelik December 5, 2023 12:43
@bilgeyucel bilgeyucel self-assigned this Dec 5, 2023
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

@annthurium annthurium left a comment

Choose a reason for hiding this comment

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

Overall this was great! Clear explanations, quick to run through. Left one small suggestion but overall, lgtm.

I'm not sure if I'm qualified to actually approve tutorials yet - maybe you want another review from @TuanaCelik? Up to you!

"source": [
"## Overview\n",
"\n",
"This tutorial shows you how to create a generative question-answering pipeline using the retrieval-augmentation ([RAG](https://www.deepset.ai/blog/llms-retrieval-augmentation)) approach with Haystack 2.0. The process involves three main components: InMemoryBM25Retriever for fetching relevant documents, PromptBuilder for creating a template prompt, and GPTGenerator for generating responses.\n",

Choose a reason for hiding this comment

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

nit: it might be convenient for the reader to add links to the docs pages for these components

Copy link
Contributor

Choose a reason for hiding this comment

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

agree

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

"id": "nenbo2SvycHd"
},
"source": [
"> You can replace `GPTGenerator` in your pipeline with another `Generator`. Check out the full list of generators [here](https://docs.haystack.deepset.ai/v2.0/docs/generators)."

Choose a reason for hiding this comment

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

It's nice that you lowkey emphasized how Haystack is model-agnostic here :D

"source": [
"### Visualize the Pipeline\n",
"\n",
"Draw the pipeline with the `draw()` method to confirm the connections are correct. You can find the diagram in the Files section of this Colab."

Choose a reason for hiding this comment

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

Thank you for specifying where you can find the file! That's very helpful for newbies.

"source": [
"## Overview\n",
"\n",
"This tutorial shows you how to create a generative question-answering pipeline using the retrieval-augmentation ([RAG](https://www.deepset.ai/blog/llms-retrieval-augmentation)) approach with Haystack 2.0. The process involves three main components: InMemoryBM25Retriever for fetching relevant documents, PromptBuilder for creating a template prompt, and GPTGenerator for generating responses.\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

agree

"source": [
"from haystack.telemetry import tutorial_running\n",
"\n",
"tutorial_running(27)"
Copy link
Contributor

Choose a reason for hiding this comment

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

We already have telemetry?

@bilgeyucel bilgeyucel merged commit 9e9d6fa into main Dec 6, 2023
2 checks passed
@bilgeyucel bilgeyucel deleted the tut-27-new branch December 6, 2023 16:31
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