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

Implementation of Key Components for RAG Chatbot and Reranking #19

Closed
wants to merge 49 commits into from

Conversation

HassanAlAdraaa
Copy link
Contributor

What are the changes?

New Components/Features

* created text chunks for testing
* generated embeddings form text chunks using sentence transformer
* configured Qdrant database and created a collection to store the embeddings
* stored the embeddings and test the retrieval process
Initialized a Qdrant client as the vector space database
Created a collection to store the embeddings
Defined a knowledge base in the form of questions and answers (used for testing the RAG)
Generated and inserted the embeddings into the Qdrant collection along with the associated metadata (questions and answers).
Initialized Groq llm
Configured Qdrant as a Retriever
Integrated SentenceTransformer into the retriever for encoding queries
Defined a prompt template for the language model
Initialized a RetrievalQA chain in LangChain using the Groq LLM, Qdrant retriever, and prompt template.
Implemented and Tested Answer Function
•	Set Up Qdrant and SentenceTransformers for Initial Retrieval
•	Set up the Flashrank Ranker
•	Prepared retrieved documents from Qdrant into a format suitable for reranking.
•	automated the retrieval and reranking processes in one function in one flow
•	Conducted tests with various health-related queries, and observed the effect of reranking on the order of results.
•	Set Up LangChain RetrievalQA with Qdrant.
•	Integrated the reranking process using Flashrank Ranker into the RAG system, so that it reranks documents retrieved from Qdrant before passing them to the Groq LLM.
•	Modified the RAG pipeline to ensure reranked results were prioritized when generating the final answer.
•	Tested the chatbot with health-related queries to confirm that reranking improves the context provided to the Groq LLM.
•	Checked the quality of the results and ensured reranking enhanced the generated answers.
Initialized a Qdrant client as the vector space database
Created a collection to store the embeddings
Defined a knowledge base in the form of questions and answers (used for testing the RAG)
Generated and inserted the embeddings into the Qdrant collection along with the associated metadata (questions and answers).
Initialized Groq llm
Configured Qdrant as a Retriever
Integrated SentenceTransformer into the retriever for encoding queries
Defined a prompt template for the language model
Initialized a RetrievalQA chain in LangChain using the Groq LLM, Qdrant retriever, and prompt template.
Implemented and Tested Answer Function
* created text chunks for testing
* generated embeddings form text chunks using sentence transformer
* configured Qdrant database and created a collection to store the embeddings
* stored the embeddings and test the retrieval process
•	Set Up Qdrant and SentenceTransformers for Initial Retrieval
•	Set up the Flashrank Ranker
•	Prepared retrieved documents from Qdrant into a format suitable for reranking.
•	automated the retrieval and reranking processes in one function in one flow
•	Conducted tests with various health-related queries, and observed the effect of reranking on the order of results.
•	Set Up LangChain RetrievalQA with Qdrant.
•	Integrated the reranking process using Flashrank Ranker into the RAG system, so that it reranks documents retrieved from Qdrant before passing them to the Groq LLM.
•	Modified the RAG pipeline to ensure reranked results were prioritized when generating the final answer.
•	Tested the chatbot with health-related queries to confirm that reranking improves the context provided to the Groq LLM.
•	Checked the quality of the results and ensured reranking enhanced the generated answers.
* created text chunks for testing
* generated embeddings form text chunks using sentence transformer
* configured Qdrant database and created a collection to store the embeddings
* stored the embeddings and test the retrieval process
Initialized a Qdrant client as the vector space database
Created a collection to store the embeddings
Defined a knowledge base in the form of questions and answers (used for testing the RAG)
Generated and inserted the embeddings into the Qdrant collection along with the associated metadata (questions and answers).
Initialized Groq llm
Configured Qdrant as a Retriever
Integrated SentenceTransformer into the retriever for encoding queries
Defined a prompt template for the language model
Initialized a RetrievalQA chain in LangChain using the Groq LLM, Qdrant retriever, and prompt template.
Implemented and Tested Answer Function
•	Set Up Qdrant and SentenceTransformers for Initial Retrieval
•	Set up the Flashrank Ranker
•	Prepared retrieved documents from Qdrant into a format suitable for reranking.
•	automated the retrieval and reranking processes in one function in one flow
•	Conducted tests with various health-related queries, and observed the effect of reranking on the order of results.
•	Set Up LangChain RetrievalQA with Qdrant.
•	Integrated the reranking process using Flashrank Ranker into the RAG system, so that it reranks documents retrieved from Qdrant before passing them to the Groq LLM.
•	Modified the RAG pipeline to ensure reranked results were prioritized when generating the final answer.
•	Tested the chatbot with health-related queries to confirm that reranking improves the context provided to the Groq LLM.
•	Checked the quality of the results and ensured reranking enhanced the generated answers.
* created text chunks for testing
* generated embeddings form text chunks using sentence transformer
* configured Qdrant database and created a collection to store the embeddings
* stored the embeddings and test the retrieval process
Initialized a Qdrant client as the vector space database
Created a collection to store the embeddings
Defined a knowledge base in the form of questions and answers (used for testing the RAG)
Generated and inserted the embeddings into the Qdrant collection along with the associated metadata (questions and answers).
Initialized Groq llm
Configured Qdrant as a Retriever
Integrated SentenceTransformer into the retriever for encoding queries
Defined a prompt template for the language model
Initialized a RetrievalQA chain in LangChain using the Groq LLM, Qdrant retriever, and prompt template.
Implemented and Tested Answer Function
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.

1 participant