Abdullahw72 / langchain-chatbot-multiple-PDF

Langchain Chatbot with Multiple PDF Support using OpenAI and Hugging Face Models
51 stars 32 forks source link

Prompt Template #1

Open columk1 opened 1 year ago

columk1 commented 1 year ago

It would be nice to be able to add an initial prompt template to set some rules as there are lots of hallucinations even with the temperature set to 0. From the langchain documentation it looks like ConversationalRetrievalChain.from_llm() might take a parameter but I can't get it to work.

It would also be nice to somehow force the llm to only answer from the supplied docs and to include sources like we see on ChatPDF.

Cool project though, thanks a lot for the repo!

Abdullahw72 commented 1 year ago

Thanks for raising this point. I'll look into it and see if I can find a fix for the prompt template. As for forcing it to answer from the supplied document, and including source PDF, I tried implementing both of these things, but so far I have not been able to get desired results. I'll update this issue if I am able to make progress!