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

Problem in Answers and Retrieval document using LLAMA-2 13 B model with langchain #26846

Open
tripurarisingh1 opened this issue Sep 25, 2024 · 0 comments
Labels
Ɑ: vector store Related to vector store module

Comments

@tripurarisingh1
Copy link

tripurarisingh1 commented Sep 25, 2024

Issue with current documentation:

I am using LLAMA-2 13 B model with langchain
For embeddings i am using
embeddings = HuggingFaceInstructEmbeddings(
model_name="WhereIsAI/UAE-Large-V1", model_kwargs={"device": DEVICE}
)

db = FAISS.load_local(path, embeddings,allow_dangerous_deserialization=True)
prompt_template = f"{template}\nCONTEXT:\n\n{{context}}\nQuestion: {{question}}\n[INST]"
prompt = PromptTemplate(template=prompt_template, input_variables=["context", "question"])

	   qa_chain = RetrievalQA.from_chain_type(
            llm=llm2,
            chain_type="stuff",
            retriever=db.as_retriever(search_kwargs={"k": 4}),
            return_source_documents=True,
            chain_type_kwargs={"prompt": prompt}
        )

result = qa_chain({"context": "", "query": user_input+" Just tell what you know"})

Chunk Size:
text_splitter = RecursiveCharacterTextSplitter(chunk_size=512, chunk_overlap=60)
texts = text_splitter.split_documents(docs)

For question/answers it's not providing correct retriever document and answers.

Kindly provide me answers how i need to fix this. it's high prority.

Idea or request for content:

No response

@dosubot dosubot bot added the Ɑ: vector store Related to vector store module label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ɑ: vector store Related to vector store module
Projects
None yet
Development

No branches or pull requests

1 participant