Skip to content

Latest commit

 

History

History
113 lines (80 loc) · 4.23 KB

evaluation-and-ci.md

File metadata and controls

113 lines (80 loc) · 4.23 KB

Evaluation, CI, and Release

The repository includes workflows and tests to validate both correctness and information retrieval quality.

CI Workflows

GitHub Actions workflows cover:

  • Build and typecheck.
  • Unit and integration tests.
  • Integration tests against local YDB using the integration suite.
  • Code-indexer smoke tests against local YDB.
  • Recall and F1 evaluation for the one-table global layout in exact-only mode.
  • Soak and stress load tests against local YDB.

Workflows that need YDB start it through astandrik/setup-local-ydb@v1 instead of open-coding a local-ydb service container and readiness loop. Host-side Node/YDB SDK jobs also map the action-created static and dynamic Docker hostnames to 127.0.0.1, because local YDB discovery can advertise container hostnames while the action exposes gRPC through loopback-bound host ports.

Badges in the root README link to:

  • Build: ci-build.yml
  • Tests: ci-tests.yml
  • Integration tests: ci-integration.yml
  • Recall/F1: ci-recall.yml with badges for the one_table layout.

Recall and F1 Evaluation

Semantic recall and F1 metrics are computed following ANN-benchmarks methodology, but now serve as an exact-search correctness guard rather than an approximate-quality benchmark.

Benchmark Parameters

The recall benchmark uses realistic parameters designed to validate exact retrieval correctness on realistic vectors:

Parameter Value Rationale
Dimensions 768 Matches transformer embeddings (sentence-transformers, BERT)
Dataset size 5,000 Similar scale to Fashion-MNIST benchmark
Query count 50 Statistical significance
K (top-K) 10 Standard ANN-benchmarks setting
Distance Cosine Angular/cosine similarity
Pass threshold 100% Exact search should match brute-force ground truth

Ground Truth Computation

Ground truth is computed via exact brute-force k-NN:

  1. Generate random normalized vectors for dataset and queries
  2. For each query, compute cosine similarity to all dataset points
  3. Sort by descending similarity and take top-K as ground truth
  4. Compare search results against ground truth

This methodology ensures:

  • No artificial cluster separation (random vectors)
  • Realistic similarity distributions
  • Exact search stays aligned with brute-force ground truth

Metrics

  • Recall@K: |retrieved ∩ ground_truth| / K
  • F1: Harmonic mean of precision and recall
  • Pass threshold: Mean recall = 100%

High-level IR evaluation background follows:

CI Output

Tests output metrics for Shields.io badges:

RECALL_MEAN_ONE_TABLE <value>
F1_MEAN_ONE_TABLE <value>

Releasing and Publishing

Releasing and publishing to npm is automated but can also be done manually.

Versioning:

  • Use semantic versioning as described in the npm docs.
  • From ydb-qdrant/, run:
npm version patch|minor|major

to bump the version and create a git tag (for example, v0.2.0).

Manual publish:

  • Ensure you are logged in to npm (npm whoami).
  • From ydb-qdrant/, run:
npm publish

This will run tests and build via the prepublishOnly script before uploading the tarball.

CI publish:

  • GitHub Actions workflow .github/workflows/release-please.yml runs on pushes to main.
  • When a Release Please PR is merged into main, Release Please creates the version tag and publishes the GitHub Release.
  • GitHub Actions workflow .github/workflows/publish-ydb-qdrant.yml normally publishes to npm from that GitHub Release published event.
  • For fully automatic publishing, configure RELEASE_PLEASE_TOKEN so Release Please does not fall back to github.token; GitHub suppresses downstream workflow runs from most events created with github.token.
  • If the token is not configured, run .github/workflows/publish-ydb-qdrant.yml manually with the release tag.
  • Configure npm trusted publishing for this repository and workflow; the workflow runs:
npm ci
npm test
npm run build
npm publish