@vxil/sdk 0.11.1 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -741,7 +741,14 @@ export interface SearchHit {
741
741
  chunk_id: string;
742
742
  doc_id: string;
743
743
  text: string;
744
+ /** the fused RANK value (reciprocal-rank fusion: ≈ 1/61 for the first hit at
745
+ * the default rrf_k) — it orders the hits; it is NOT a similarity, so never
746
+ * threshold on it. */
744
747
  score: number;
748
+ /** cosine similarity of the hit to the query (−1…1, higher = closer) — the
749
+ * value to threshold on. null when the query used no vector (mode
750
+ * 'keyword', or a bring-your-own-vectors collection queried by text only). */
751
+ similarity: number | null;
745
752
  /** provider relevance score — present only when the hit went through the
746
753
  * configured BYO reranker (`reranked: true` on the result set). */
747
754
  rerank_score?: number;
@@ -1499,6 +1506,9 @@ export interface RagSearchHit {
1499
1506
  text: string;
1500
1507
  /** the raw retrieval score (RRF, or rerank relevance when reranked). */
1501
1508
  score: number;
1509
+ /** cosine similarity of the hit to the query, passed through from
1510
+ * vector-search (−1…1; null when retrieval used no query vector). */
1511
+ similarity?: number | null;
1502
1512
  /** the effective post-boost score results are RANKED by — present only when
1503
1513
  * metadata boosts applied (rag.md §2f). */
1504
1514
  boosted_score?: number;
@@ -4031,11 +4041,13 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
4031
4041
  hook_reconcile?: {
4032
4042
  created: number;
4033
4043
  updated: number;
4044
+ unchanged?: number;
4034
4045
  deleted: number;
4035
4046
  failed: number;
4036
4047
  };
4037
4048
  cron_schedules?: {
4038
4049
  created: number;
4050
+ unchanged?: number;
4039
4051
  deleted: number;
4040
4052
  failed: number;
4041
4053
  };
@@ -5149,7 +5161,10 @@ export declare class Vxil<S extends VxilSchemaShape = VxilSchemaShape> {
5149
5161
  }) => Promise<RagStreamHandle>;
5150
5162
  /** Retrieval-only grounding preview (rag.md §1c): the exact chunks `answer`
5151
5163
  * would ground on, with rerank + metadata boosts applied — no generation,
5152
- * no token spend. `boosts`/`rerank`/`min_score` override the rag config. */
5164
+ * no token spend. `boosts`/`rerank`/`min_score` override the rag config.
5165
+ * `min_score` floors the EFFECTIVE `score`, which is a RANK value (about
5166
+ * 0.016–0.033 at the top): a floor above ~0.033 drops every hit. Judge
5167
+ * relevance by each hit's `similarity` (cosine, -1..1) instead. */
5153
5168
  search: (input: {
5154
5169
  query: string;
5155
5170
  collection?: string;
package/dist/index.js CHANGED
@@ -1905,7 +1905,10 @@ export class Vxil {
1905
1905
  stream: async (input) => (await this.call('POST', '/v1/rag/answer', { ...input, stream: true })).data,
1906
1906
  /** Retrieval-only grounding preview (rag.md §1c): the exact chunks `answer`
1907
1907
  * would ground on, with rerank + metadata boosts applied — no generation,
1908
- * no token spend. `boosts`/`rerank`/`min_score` override the rag config. */
1908
+ * no token spend. `boosts`/`rerank`/`min_score` override the rag config.
1909
+ * `min_score` floors the EFFECTIVE `score`, which is a RANK value (about
1910
+ * 0.016–0.033 at the top): a floor above ~0.033 drops every hit. Judge
1911
+ * relevance by each hit's `similarity` (cosine, -1..1) instead. */
1909
1912
  search: async (input) => (await this.call('POST', '/v1/rag/search', input)).data,
1910
1913
  /** Ingest into the backing vector-search collection (chunk → embed → index). */
1911
1914
  ingest: async (collection, input) => (await this.call('POST', `/v1/rag/ingest/${encodeURIComponent(collection)}`, input)).data,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vxil/sdk",
3
- "version": "0.11.1",
3
+ "version": "0.12.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Typed client for the Vxil REST API (notifications, auth, jobs, files, cms, comments, webhooks, realtime, orgs, rate-limits).",