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

[Bug]: Knowledge articles are not being used #2486

Open
marcato15 opened this issue Apr 24, 2024 · 3 comments
Open

[Bug]: Knowledge articles are not being used #2486

marcato15 opened this issue Apr 24, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@marcato15
Copy link

marcato15 commented Apr 24, 2024

What happened?

I finally setup Quivr using ollama/lama2, and added a bunch of pdf's about malaria. However, when I ask questions it seems to have no knowledge of the sources I added to the brain. When I ask questions about malaria it's answering using knowledge from what I presume is the base LLM but when I asked to show sources it just responds it has none. Is there a minimum number of documents to add? I wish it would only respond using the documents I give it. I don't want it responding using general knowledge.

Relevant log output

worker        | [2024-04-24 14:43:30,527: INFO/ForkPoolWorker-1] HTTP Request: POST http://host.docker.internal:54321/rest/v1/vectors?columns=%22content%22%2C%22embedding%22%2C%22metadata%22%2C%22id%22 "HTTP/1.1 400 Bad Request"
worker        | [ERROR] packages.embeddings.vectors [vectors.py:23]: Error creating vector for document {'code': '22000', 'details': None, 'hint': None, 'message': 'expected 1536 dimensions, not 4096'}
worker        | [2024-04-24 14:43:30,533: WARNING/ForkPoolWorker-1] Error processing file: 'NoneType' object is not iterable
worker        | [2024-04-24 14:43:30,542: INFO/ForkPoolWorker-1] HTTP Request: PATCH http://host.docker.internal:54321/rest/v1/notifications?id=eq.40538142-6bb4-4a28-9f36-e5e84029b6c4 "HTTP/1.1 200 OK"
worker        | [2024-04-24 14:43:30,551: INFO/ForkPoolWorker-1] HTTP Request: PATCH http://host.docker.internal:54321/rest/v1/brains?brain_id=eq.678c3ece-377f-46b3-9c82-e2dd67715796 "HTTP/1.1 200 OK"
worker        | [2024-04-24 14:43:30,552: INFO/ForkPoolWorker-1] Task process_file_and_notify[96451d30-c937-40bc-8fbc-fd3636f9b6b4] succeeded in 58.662878985000134s: True

Twitter / LinkedIn details

No response

@marcato15 marcato15 added the bug Something isn't working label Apr 24, 2024
Copy link

dosubot bot commented Apr 24, 2024

It sounds like the issue with Quivr not utilizing your added documents for answering questions might be related to the configuration of the ollama/lama2 integration. Ensure that the OLLAMA_API_BASE_URL is correctly set in your .env file, as it needs to be uncommented and provided with the correct URL to enable the integration properly. This step is crucial for Quivr to use the documents you've added for retrieval-augmented generation.

There's no specified minimum number of documents required for Quivr to function. The system should use the documents you've added as long as they are correctly formatted and accessible. Ensure your PDFs about malaria are structured in a way that their content can be directly used as input to the system. Each document's content should be self-contained and understandable on its own, following the DEFAULT_DOCUMENT_PROMPT template format.

Quivr generates a list of sources from the documents associated with a given brain ID without explicitly prioritizing certain sources over others. It processes URLs and file paths differently, ensuring each source is unique and accessible. If your documents are correctly formatted and the ollama/lama2 integration is properly configured, Quivr should be able to use them for answering questions.

If you've confirmed these settings and are still facing issues, it might be worth reviewing the specific configurations and formats again or exploring further documentation on how Quivr manages document sources and answers questions based on them.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@StanGirard
Copy link
Collaborator

The issue is the document weren't correctly embedded because you used Ollama :/

Please delete all data in the tables and start again.

@marcato15
Copy link
Author

So can I not use Ollama?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants