trustgraph/tests/unit/test_embeddings
cybermaggedon 1740e315f4
feat: batch row imports and split index configuration (#1055)
Adds batching to structured data row imports. Previously each row was
sent as a separate WebSocket message, causing one embeddings service
call per row. The bulk import clients now accumulate rows into batches
(default 40) before sending, and the --batch-size CLI argument is
wired through from tg-load-structured-data to the import call.

Splits the schema "indexes" field into two separate configurations:
- "query-indexes": fields for Cassandra exact-match retrieval
- "vector-indexes": fields for vector embedding and semantic search

This avoids wasting compute embedding primary key integers that only
need exact lookup, while allowing each field to independently opt in
to either or both retrieval patterns.

Adds row_id (the primary key value) as a clustering column in the
Cassandra rows table so multiple rows sharing the same index value
no longer silently overwrite each other.

Tests updated for new Cassandra schema.
2026-07-22 10:20:06 +01:00
..
__init__.py Extending test coverage (#434) 2025-07-14 17:54:04 +01:00
conftest.py Extending test coverage (#434) 2025-07-14 17:54:04 +01:00
test_document_embeddings_processor.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
test_embedding_logic.py Extending test coverage (#434) 2025-07-14 17:54:04 +01:00
test_embedding_utils.py Extending test coverage (#434) 2025-07-14 17:54:04 +01:00
test_embeddings_client.py Updated test suite for explainability & provenance (#696) 2026-03-13 14:27:42 +00:00
test_embeddings_service_contract.py Dynamic embeddings model (#556) 2025-11-10 20:38:01 +00:00
test_embeddings_service_request.py Updated test suite for explainability & provenance (#696) 2026-03-13 14:27:42 +00:00
test_fastembed_dynamic_model.py Embeddings API scores (#671) 2026-03-09 10:53:44 +00:00
test_graph_embeddings_processor.py feat: workspace-based multi-tenancy, replacing user as tenancy axis (#840) 2026-04-21 23:23:01 +01:00
test_huggingface_dynamic_model.py Fix HF embeddings tests (#967) 2026-06-01 12:35:09 +01:00
test_ollama_dynamic_model.py Fix Ollama async issue (#854) 2026-04-28 15:43:04 +01:00
test_row_embeddings_processor.py feat: batch row imports and split index configuration (#1055) 2026-07-22 10:20:06 +01:00