-
Notifications
You must be signed in to change notification settings - Fork 5
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are the changes?
New Components/Features