Find answers from the community

Home
Members
le_woudar
l
le_woudar
Offline, last seen 3 months ago
Joined September 25, 2024
l
le_woudar
·

Embedding

I have the following answer with the prevous code

Plain Text
The author didn't mention what they did growing up. The context only talks about the author's experiences as an adult, such as painting, working on web apps, and starting companies. There is no information about their childhood or growing up years.


by the way, if I replace "sentence-transformers/all-MiniLM-L6-v2" with "BAAI/bge-base-en-v1", I have the expected answer

Plain Text
The author wrote short stories and tried writing programs on the IBM 1401 computer in 9th grade.


I want to know if sentence-transformers/all-MiniLM-L6-v2 is not compatible with llama-index or if we need to adjust other parameters to make it work. Thank you in advance for your suggestions.
4 comments
L
l
It works well but I think every time I enter the if condition to get an index from an existing vector store, a new index is created in the database like you can see in this capture (the last lines data_..idx..).

Plain Text
vector_db=# \d+ data_paul_graham_essay;
                                                              Table "public.data_paul_graham_essay"
  Column   |       Type        | Collation | Nullable |                      Default                       | Storage  | Compression | Stats target | Description 
-----------+-------------------+-----------+----------+----------------------------------------------------+----------+-------------+--------------+-------------
 id        | bigint            |           | not null | nextval('data_paul_graham_essay_id_seq'::regclass) | plain    |             |              | 
 text      | character varying |           | not null |                                                    | extended |             |              | 
 metadata_ | json              |           |          |                                                    | extended |             |              | 
 node_id   | character varying |           |          |                                                    | extended |             |              | 
 embedding | vector(1024)      |           |          |                                                    | external |             |              | 
Indexes:
    "data_paul_graham_essay_pkey" PRIMARY KEY, btree (id)
    "data_paul_graham_essay_embedding_idx" hnsw (embedding vector_cosine_ops) WITH (m='16', ef_construction='64')
    "data_paul_graham_essay_embedding_idx1" hnsw (embedding vector_cosine_ops) WITH (m='16', ef_construction='64')
    "data_paul_graham_essay_embedding_idx2" hnsw (embedding vector_cosine_ops) WITH (m='16', ef_construction='64')
Access method: heap


I'm not sure this is normal. does anyone have any idea what's going on? Thank you in advance 🙂
1 comment
l