Commit Graph

10 Commits

Author SHA1 Message Date
Christian Tzolov
76e44d68e4 Improve the Document API
- Add ContentFormatter and DefaultContentFormatter that can filter the metadata
   and format the Document metadata and text according to predefined templates.
 - Add content formatter tests
 - Allow the TextSplitter to copy the document  content-formatter to the children.
    When the splitter breaks the parent Document into multiple chunks (e.g.
    into a list of children Documents) copy the source content formatter to
    the chunks by default. Use the copyContentFormatter flag to enable/disable copping.
 - Add TextSplitter IT tests
 - Add MetadataExtractors as DocumentTransformers.
 - Bump spring-ai project version to 0.7.0-SNAPSHOT
 - Configurable metadata-mode for EmbeddingClients
   - Make the metadata mode configurable for the EmbeddingClient implementations.
   - Use the EMBED mode by default.

 Resolves #44
2023-10-03 14:39:17 -04:00
Christian Tzolov
65a6ffcffb Dynamic embedding dimensions resolution
Leverage #28 to allow the vector stores to resolve the embedding dimensions dynamically.
 The explicitly set dimensions (if set) precedence over other configurations.
 If the embedding dimensions are not explicitly set, the embeddingClient is used
 to determine  them dynamically. If the client fails the it falls back to 1536.
2023-09-28 08:57:20 +02:00
Christian Tzolov
12e3c7be1d Stabilize the vector store ITs
- Ensures that the vector store similarity search by threshold tests
   use dynamically computed threshold that is between the top 2 results
   from the ordered search. This ensures that the threshold value is not
   affected by changes in the embedding API results.

 - Minor code style improvments.
2023-09-28 06:25:57 +02:00
Christian Tzolov
a45e34edd7 Harden milvus IT test fixtures 2023-09-28 05:25:29 +02:00
Gerrit Meier
a6fba7a3b6 GH-26 - Add support for Neo4j vector index.
This commit brings support for Neo4j graph database in general,
and uses the vector index functionality available since version 5.11.

Aligned with the existing PgVector store and its tests.

The module creates indexes, if needed, for the vector search and
the identifier of the document object.

Add neo4j to vectordb docs page

Co-authored-by: Michael Simons <michael@simons.ac>
2023-09-27 16:03:51 -04:00
Christian Tzolov
141f503341 Integrate Milvus as a Vestor Store
Resolves #19

* Clear and stream line. Inject search distance response as metadata
* Fix similarity threshold by metric type

 - Fix the similary search with threshold for L2 and IP types.
 - Create config Builder Config (inspired by Neo4jVectorStore impelementation.
   - add database-name, metric-type, index-type and index-param configurations.

* update vector store doc and readme
2023-09-27 12:24:52 -04:00
Christian Tzolov
9beb7c6b7b PgVectorStore similarity search threshold fix
Resolves #30
2023-09-22 18:54:51 +02:00
Christian Tzolov
c0aaa63411 Inject search distance as metadata in the result. Harden the tests 2023-09-21 17:07:51 +02:00
Christian Tzolov
c852467c9c PgVectorStore improvements and fixes
- PgVectorStore implements the SmartLifecycle to initialize & clean the DB.
 - Fix a bogus threshlold similarity search and add test for it.
 - Add an internal embeddinDistance method.
2023-09-20 17:15:48 +02:00
Christian Tzolov
5a63cd840c Add PGVector VectorStore implementation
* Enable PGVector indexing support
* Add same document ID vector update support
* Add documentation for VectorStores
2023-09-17 17:41:37 -04:00