Closed ragvendra3898 closed 8 months ago
🤖
Thank you for providing a detailed description of your issue. It seems like the inconsistency in the results might be due to the nature of the underlying language model or the retrieval process from the chromadb vectorstore. However, to better understand and diagnose the issue, I would need a bit more information.
llm
object that you're using? What kind of language model is it and how is it configured?filters
you're using in the search_kwargs
? What kind of documents are you trying to retrieve from the chromadb vectorstore?PREFIX
and FORMAT_INSTRUCTIONS
in your agent_kwargs
? Are they static or dynamic based on the input?The more information you can provide, the better I can assist you in resolving this issue.
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
If you want to continue the conversation, start your reply with @dosu-bot.
Sure, here is the info about llm object I am using
from langchain.prompts import PromptTemplate from langchain_openai import ChatOpenAI llm = ChatOpenAI(model_name='gpt-4', temperature=0)
also filters is None filters = None and here is the prompt which I am using for general summary
general_summary_prompt_template = """ Context: {summaries} Question: {question}
Task:
Summarize the content of the file with the filename mentioned in the context.
If the answer is not provided in the context, start your answer with "I'm sorry, I couldn't find that information in the context." Provide a concise and informative summary of the main points in the document. Include key information and insights found in the file. If there is a URL link in the context, provide it in your response.
Notes:
Please use natural language and avoid using jargon in your responses. Don't say things like "The provided text does not contain enough information", just answer what you can based on the context. If you are unable to answer the question, please explain why. """
general_summary_prompt = PromptTemplate(input_variables=["summaries", "question"],template=general_summary_prompt_template) general_summary_kwargs = {"prompt": general_summary_prompt}
I am also facing same issue most of time it giving me generic answer not taking my passed document as a context. @ragvendra3898 Any update on this part.
Checked other resources
Example Code
Hi Team, I am using chromadb for uploading documents and then trying to get the answer from db using using Agent but every time it is generating inconsistent results and the probability to generate correct answer is 0.1 so let me know how can I fix this
where answer4 ls correct but why I am not getting it consistently.
Please help me on this, I will be thankful to you.
Error Message and Stack Trace (if applicable)
No response
Description
I am trying to get answers from chromadb vectorstore using Agent but every time it is producing inconsistent results.
System Info
System Information
Package Information