Repository navigation
Release 3.3.0: catalog lookups (search_values, get_schema_summary, resolve_names, get_join_candidates) - #31
Merged
Merged
Conversation
…solve_names, get_join_candidates) ai.search_values(text, ...) finds where a value is stored across every property (also near spellings with match="similar"); ai.get_schema_summary returns every label's properties with distinct counts, ranges and the values of small fields; ai.resolve_names maps a name that is not in the schema to the real label or property; ai.get_join_candidates proposes how labels reference each other, with evidence. properties.values gains value search: query=, match=, limit=, domain_on_miss=, min_similarity=, with counts and searchMissed in the result. In direct mode the first three run on the engine; get_join_candidates is RushDB Cloud only and raises CloudOnlyError before sending anything. A plain limit on properties.values now reads the top values by record count in direct mode, as the TypeScript SDK does.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Python parity with the TypeScript SDK's catalog lookups (rush-db/javascript-sdk#5, released in 3.1.0): the reads agents use to find how values and names are actually stored before they query.
Before publishing
ai.*methods andproperties.values(query=...)against RushDB Cloud and against a standalone engine. TheSchemaSummary*andJoinEvidencetypes were copied from the TypeScript types and haven't been checked against a live response.v3.3.0to publish.What
ai.search_values(text, match=, labels=, limit=, min_similarity=, case_sensitive=): where a value from a question is stored, across every property. Each match gives the label, property and record count;match="similar"finds near spellings. CallsPOST /ai/values/search.ai.get_schema_summary(labels=, few_values=): every label's properties with distinct counts, ranges and the values of small fields, in one read. CallsPOST /ai/schema/summary.ai.resolve_names(text, limit=): the real label or property behind a name that isn't in the schema. CallsPOST /ai/schema/names.ai.get_join_candidates(labels=, min_confidence=): how labels reference each other, with evidence. RushDB Cloud only. CallsPOST /ai/schema/join-candidates.properties.values(..., query=, match=, limit=, domain_on_miss=, min_similarity=): value search. The new options are keyword-only and win over the same keys insearch_query. The result addscounts,distinctCountandsearchMissed.rushdbandrushdb.models):SearchValuesParams,ValueMatch,ValueMatchesData,NameSuggestion,SchemaSummaryLabel,JoinCandidate,PropertyValuesSearchandValueMatchMode.Direct mode
search_values,get_schema_summaryandresolve_namesrun on the engine (query.searchValues,describe.schemaSummary,describe.names), routed as the TypeScript SDK's direct router does.get_join_candidatesraisesCloudOnlyErrorbefore sending anything.limitonproperties.valuesnow reads the top values by record count, as in TypeScript. Before, direct mode ignoredlimitthere.Testing
tests/test_catalog_lookups.py(new) checks each method's route and body, default bodies, and theproperties.valuesmerge, including that the caller's dict is left unchanged.tests/test_direct_mode.pycovers engine routing for the three engine methods and value search, and the Cloud-only refusal.