Filtering and searching records

Find Records using exact filters, semantic search, or combined queries to provide relevant context to Flows and Agents.

Search by exact or partial matches on metadata fields.

In the dashboard

  1. Go to Records
  2. Filter by Record type using the type tabs
  3. Use the filter builder to add conditions on metadata fields with operators such as equals, contains, greater than, and more

Filter syntax in Flows

Use a record filter on a List Records step (or a Get Record step, for a single match), or configure filters on a Vector Search step. A record filter requires a type field to scope the search and an optional where clause with conditions and groups:

1{
2 "type": "customers",
3 "where": {
4 "op": "and",
5 "conditions": [
6 { "field": "tier", "op": "eq", "value": "premium" },
7 { "field": "orderCount", "op": "gt", "value": 10 }
8 ]
9 }
10}

The where clause supports these operators:

  • eq, neq — Equality
  • gt, gte, lt, lte — Comparison
  • contains, startsWith, endsWith — String matching
  • in, notIn — Set membership
  • isSet, isNotSet — Existence checks
  • isTrue, isFalse — Boolean checks
  • between — Range matching
  • withinLastDays, olderThanDays — Date-relative filters

Groups use "op": "and" or "op": "or" to combine conditions.

Find Records by meaning using natural language queries.

How it works

Runtype converts your query into a vector embedding and finds Records with similar embeddings. This matches conceptual similarity, not just keywords.

Example queries

  • “How do I reset my password?” → Finds password reset documentation
  • “Affordable laptops for students” → Finds budget laptop Products
  • “Shipping delays” → Finds policies and updates about shipping

In Flows

Use the Vector Search step with a query template:

{{userQuestion}}

The step returns Records ranked by similarity score.

Semantic search works best on text-heavy fields like descriptions, content, or article bodies. It’s less effective on structured data like IDs or numbers.

The Vector Search step supports both a semantic query and metadata filters. Use the recordType field to scope results, and metadataFilters for additional constraints:

  1. Semantic query: “Technical issues with Widget Pro”
  2. Record type: support

This finds semantically relevant support articles within the support record type.

Result ranking

Search results are ranked by:

  • Filter search: No ranking, returns all matches
  • Semantic search: Similarity score (most relevant first)

Limit results to top N for performance:

limit: 5 // Return top 5 results

Record type filtering

Search within a specific Record type. On a Vector Search step, set the recordType field:

recordType: documentation
query: "API authentication"

Leave recordType empty to search across all types (slower but comprehensive).

Field selection

When building Flows, you control which data is used for each search type:

  • Embedded fields: The Generate Embedding step determines which text is embedded for semantic search
  • Filterable fields: Any metadata field can be used in record filters for exact matching

Performance considerations

  • Small datasets (under 1k Records): All search types perform well
  • Large datasets (10k+ Records): Add filters to narrow semantic search scope
  • Very large datasets (100k+ Records): Use record type filtering and limit result counts

Search examples

Customer lookup

1{
2 "type": "customers",
3 "where": {
4 "op": "and",
5 "conditions": [
6 { "field": "email", "op": "eq", "value": "jane@example.com" }
7 ]
8 }
9}

High-value customers

1{
2 "type": "customers",
3 "where": {
4 "op": "and",
5 "conditions": [
6 { "field": "lifetime_value", "op": "gt", "value": 10000 },
7 { "field": "tier", "op": "eq", "value": "premium" }
8 ]
9 }
10}

Use the Vector Search step:

Record type: docs
Query: {{userQuestion}}
Limit: 3

Product recommendations

Combine a Vector Search with a record type filter:

Record type: products
Query: {{userPreferences}}
Limit: 5

Next steps