benman1 / generative_ai_with_langchain

Build large language model (LLM) apps with Python, ChatGPT and other models. This is the companion repository for the book on generative AI with LangChain.
https://amzn.to/43PuIkQ
MIT License
646 stars 258 forks source link

Update chat_with_documents.py #17

Closed bhadreshpsavani closed 10 months ago

bhadreshpsavani commented 10 months ago

Ideally fetch_k should be bigger than k parameter, since first it will fetch the fetch_k documents,

It will then select k document based on the search type.

Please correct me if i am wrong.

i got to know that from issue and langchain-chat-with-your-data-project -from-deeplearning.ai

benman1 commented 10 months ago

@bhadreshpsavani Thanks you very much for the correction. You are absolutely right. This is explained in the vectorstores module.