Smart Search
Ask in natural language. Inspect the query that actually ran.
Smart Search uses the project schema to translate a natural-language request into SearchQuery, executes that query, and returns both the records and the generated query. It is a query-generation surface, not a synonym for vector similarity.
Natural-language querying is unsafe when the generated operation stays hidden.
An AI-generated answer is difficult to trust when software cannot inspect the labels, filters, relationship traversal, and pagination behind it. Smart Search keeps the generated SearchQuery available beside the result.
Before
- Copy schema into a prompt by hand
- Ask a model to invent database syntax
- Execute opaque query text
- Lose warnings and refinement context
With RushDB
- Ground generation in the project schema
- Receive ordinary RushDB SearchQuery
- Inspect warnings before using the result
- Pass currentQuery when refining a query-builder session
What it enables
Natural language with an inspectable execution boundary.
The result exposes data, total, searchQuery, and warnings. Applications can render the generated filters, log them for review, or reject query shapes outside an approved server-owned policy.
Schema-grounded generation
RushDB uses the labels, properties, and relationship structure available in the project instead of relying on a generic prompt alone.
Visible SearchQuery
The generated SearchQuery is attached to the SDK result so callers can explain which labels and filters produced the records.
Refinable context
Pass currentQuery when a user refines an existing dashboard or query-builder state rather than starting from an empty request.
How it works
Start with the smallest useful path.
01
Ask for a concrete result
Name the entity, conditions, and desired ordering or grouping as clearly as you would describe the query to another developer.
02
Inspect the generated query
Read result.searchQuery and result.warnings before exposing an AI-generated operation in a privileged or high-impact workflow.
03
Refine or constrain
Use currentQuery for conversational refinement and keep authorization, tenant scope, and allowed query shapes enforced in application code.
Flow
Prompt to inspectable result
Smart Search discovers the project structure, generates SearchQuery, executes it, and returns the query metadata beside the matching records.
Implementation sketch
Return the generated query with the records.
The TypeScript and Python SDKs generate and execute the query in one call. The REST surface exposes generation separately, allowing the returned SearchQuery to be reviewed before execution.
from rushdb import RushDB
db = RushDB('RUSHDB_API_KEY')
results = db.ai.search(
'Show open checkout incidents for enterprise accounts'
)
print(results.search_query)
print(results.warnings)
print(results.total)
print(results.data)Know the operational boundary.
Smart Search is not vector search
Use records.vectorSearch or records.vector_search when you want direct similarity ranking over one indexed property. Smart Search generates an ordinary SearchQuery from natural language.
Read the SearchQuery guideGenerated does not mean automatically authorized
Inspect or validate generated labels, filters, and limits in server-owned code before using Smart Search for sensitive data or mutations.
Related guides
Go deeper on the concept.
These guides explain the product category and implementation tradeoffs behind this feature.
Guide
Ontology-Aware Querying
Let agents query using the real labels, properties, and relationship paths in your data, discovered from a live schema instead of a hand-maintained ontology doc.
Read guideGuide
Semantic + Relational Retrieval
Combine meaning-based semantic search with exact relational filters and graph relationships in one query, instead of stitching together separate systems.
Read guideNext step
Build one focused workflow.
Related features
Explore all featuresSchema API
Expose live labels, property types, sample values, numeric ranges, relationship directions, and vector-index status to agents and apps.
See schemaUnified query API
Use one SearchQuery-shaped contract for records, labels, relationships, property metadata, and distinct values or ranges.
See SearchQueryVector + graph search
Retrieve by meaning, apply exact filters, and traverse connected records without synchronizing separate retrieval stores.
See graph-aware retrieval