modelscope / agentscope

Start building LLM-empowered multi-agent applications in an easier way.
https://doc.agentscope.io/
Apache License 2.0
5.34k stars 328 forks source link

about text-embedding-v2 in rag_example.py #452

Open MoQijie opened 2 months ago

MoQijie commented 2 months ago

It is known that the current RAG instance is implemented using text-embedding-v2 . I would like to ask, does the server have a local cache(vector) after running rag_example.py every time? Do I need to re-call text-embedding-v2 next time when run it?

DavdGao commented 2 months ago

@ZiTao-Li @FredericW Please check this issue.

FredericW commented 2 months ago

Hi @MoQijie we have identified the issue. As we recently updated the file_manager, it will direct the persisted directory to runs/$instance$ instead of runs/ (see line 207, https://github.com/modelscope/agentscope/blob/main/src/agentscope/rag/llama_index_knowledge.py ). Therefore, each time we restart the instance, it will reproduce the embedding index. For a hot fix, I may suggest to fix the persist_root, for example, let persist_root= "./runs/" on line 206. We will fix this issue asap.