Normal view

There are new articles available, click to refresh the page.
Before yesterdayRecent Questions - Stack Overflow

LangChain with OpenAI not return full products in RAG QnA

I used the Python LangChain UnstructuredURLLoader to retrieve all our products on the company website for RAG purposes. The products were on different pages in the company website.

UnstructuredURLLoader was able to retrieve the products in multiple Document objects before they were chunked, embedded and stored in the vector database.

With the OpenAI LLM and RAG module, I asked the AI, "How many products in the company A?" AI replied "There are 11 products. You should check the company website for more info..."

If I asked "Please list all the products in the company A", AI replied the list of the 11 products only.

The problem is, there are more than 11 products. Why can't LLM read and aggregate the products in the Documents to count and to return all of the products?

Is there any context hint or prompt to tell LLM to read and return all products? Is it because of the chunking process?

❌
❌