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] Can I please understand why there are three instances of the vector store. #599

Open
aurotripathy opened this issue Jan 5, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@aurotripathy
Copy link

aurotripathy commented Jan 5, 2025

Description

Can I please understand why there are three instances of the vector store.

I added the statements below to the __init__ of ChromaVectorStore(LlamaIndexVectorStore):

print("\n=== New ChromaVectorStore Instance ===")
        print("Called from:")
        for frame in traceback.extract_stack()[:-1]:  # [:-1] excludes this line
            print(f"  File {frame.filename}, line {frame.lineno}, in {frame.name}")

I invoke from the command line as:

python app.py

This is what I see:

vs_conf: {'__type__': 'kotaemon.storages.ChromaVectorStore', 'path': '/home/furiosa/kotaemon/ktem_app_data/user_data/vectorstore', 'collection_name': 'index_1'}

=== New ChromaVectorStore Instance ===
Called from:
  File /home/furiosa/kotaemon/app.py, line 15, in <module>
  File /home/furiosa/kotaemon/libs/ktem/ktem/app.py, line 76, in __init__
  File /home/furiosa/kotaemon/libs/ktem/ktem/app.py, line 87, in initialize_indices
  File /home/furiosa/kotaemon/libs/ktem/ktem/index/manager.py, line 193, in on_application_startup
  File /home/furiosa/kotaemon/libs/ktem/ktem/index/manager.py, line 106, in start_index
  File /home/furiosa/kotaemon/libs/ktem/ktem/index/file/index.py, line 336, in on_start
  File /home/furiosa/kotaemon/libs/ktem/ktem/index/file/index.py, line 141, in _setup_resources
  File /home/furiosa/kotaemon/libs/ktem/ktem/components.py, line 37, in get_vectorstore
  File /home/furiosa/anaconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/utils/modules.py, line 168, in deserialize
vs_conf: {'__type__': 'kotaemon.storages.ChromaVectorStore', 'path': '/home/furiosa/kotaemon/ktem_app_data/user_data/vectorstore', 'collection_name': 'index_2'}

=== New ChromaVectorStore Instance ===
Called from:
  File /home/furiosa/kotaemon/app.py, line 15, in <module>
  File /home/furiosa/kotaemon/libs/ktem/ktem/app.py, line 76, in __init__
  File /home/furiosa/kotaemon/libs/ktem/ktem/app.py, line 87, in initialize_indices
  File /home/furiosa/kotaemon/libs/ktem/ktem/index/manager.py, line 193, in on_application_startup
  File /home/furiosa/kotaemon/libs/ktem/ktem/index/manager.py, line 106, in start_index
  File /home/furiosa/kotaemon/libs/ktem/ktem/index/file/index.py, line 336, in on_start
  File /home/furiosa/kotaemon/libs/ktem/ktem/index/file/index.py, line 141, in _setup_resources
  File /home/furiosa/kotaemon/libs/ktem/ktem/components.py, line 37, in get_vectorstore
  File /home/furiosa/anaconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/utils/modules.py, line 168, in deserialize
vs_conf: {'__type__': 'kotaemon.storages.ChromaVectorStore', 'path': '/home/furiosa/kotaemon/ktem_app_data/user_data/vectorstore', 'collection_name': 'index_3'}

=== New ChromaVectorStore Instance ===
Called from:
  File /home/furiosa/kotaemon/app.py, line 15, in <module>
  File /home/furiosa/kotaemon/libs/ktem/ktem/app.py, line 76, in __init__
  File /home/furiosa/kotaemon/libs/ktem/ktem/app.py, line 87, in initialize_indices
  File /home/furiosa/kotaemon/libs/ktem/ktem/index/manager.py, line 193, in on_application_startup
  File /home/furiosa/kotaemon/libs/ktem/ktem/index/manager.py, line 106, in start_index
  File /home/furiosa/kotaemon/libs/ktem/ktem/index/file/index.py, line 336, in on_start
  File /home/furiosa/kotaemon/libs/ktem/ktem/index/file/index.py, line 141, in _setup_resources
  File /home/furiosa/kotaemon/libs/ktem/ktem/components.py, line 37, in get_vectorstore
  File /home/furiosa/anaconda3/envs/kotaemon/lib/python3.10/site-packages/theflow/utils/modules.py, line 168, in deserialize
No module named 'lightrag'
User "admin" already exists
Setting up quick upload event
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
User-id: None, can see public conversations: False
User-id: 1, can see public conversations: True

Reproduction steps

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Screenshots

![DESCRIPTION](LINK.png)

Logs

No response

Browsers

No response

OS

No response

Additional information

No response

@aurotripathy aurotripathy added the bug Something isn't working label Jan 5, 2025
@aurotripathy aurotripathy changed the title [BUG] Can I please understand why there are three instances on the vector store. [BUG] Can I please understand why there are three instances of the vector store. Jan 5, 2025
@taprosoft
Copy link
Collaborator

Hi @aurotripathy this is used for each Collection / Index concept in Kotaemon, which serves as each independent Vectorstore for each of the Index. By default there are 3:

  • File Collection (normal Hybrid RAG)
  • GraphRAG Collection (GraphRAG-based retrieval)
  • LightRAG Collection (alternate GraphRAG implementation)

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