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

retriever.get_relevant_documents is broken. tutorial (PART 1-4) #19

Open
ca-mi-lo opened this issue Apr 30, 2024 · 1 comment
Open

retriever.get_relevant_documents is broken. tutorial (PART 1-4) #19

ca-mi-lo opened this issue Apr 30, 2024 · 1 comment

Comments

@ca-mi-lo
Copy link

Following the tutorial (PART 1-4), I noticed that the model answered with "not enough information to answer". Looking at "docs" I get this output:
[Document(page_content='Conversatin samples:\n[\n {\n "role": "system",', metadata={'source': 'https://lilianweng.github.io/posts/2023-06-23-agent/'})]
Seems like docs = retriever.get_relevant_documents("What is Task Decomposition?") is not generating a correct page_content.
If I invoke the chain for the whole context, aka splits, not docs I do get a meaningful answer.
chain.invoke({"context":splits,"question":"What is Task Decomposition?"})

Note: I'm using using googles API, but I would expect that to be irrelevant.

@rcorneanu
Copy link

I've had the same issue with Ollama + llama3.1.
After changing the embeddings model to "nomic-embed-text" instead of using the LLM, it worked great.

vectorstore = Chroma.from_documents(documents=splits,
embedding=OllamaEmbeddings(model="nomic-embed-text"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants