Rhetra Get in touch
Demo 04 · Aviation safety · Unstructured text

Semantic search over 585 safety reports.

Keyword search only returns reports that use your words. This returns reports that mean the same thing. Six steps, from a raw CSV to an agent that answers questions about the data in plain language.

pipeline → ontology → function → agent  ·  click any screen to zoom

STEP 01

Embed the text in the pipeline.

Add an embed node between the file and its output, then pick the columns to embed. Here that's narrative and anomaly. They get joined per row and sent to the embedding model in batches. It's a pipeline node, so it re-runs with everything else.

rhetra / pipelines / embedding-pipeline
Pipeline with an embed node configured over the narrative and anomaly columns
STEP 02

Run the pipeline.

You get a dataset where every row has an embedding column next to the original fields. The vectors sit with the record. There's no separate vector database to keep in sync.

rhetra / pipelines / run
Materialized dataset showing the embedding column beside the source fields
STEP 03

Import it into the ontology.

The dataset becomes an object type and the vector becomes a property on it. The incidents are entities now, so you can link and query them like anything else.

rhetra / ontology / asrs-incident
ASRS incident type in the ontology with its vector property
STEP 04

Write the search function.

sdk.embed() turns the question into a vector. sdk.nearestNeighbors() ranks the incidents against it. They're separate calls so you can embed once and search several properties, or reuse a vector you already have. minSimilarity drops the weak matches so the agent doesn't get handed noise.

rhetra / functions / find-similar-incidents
The semantic search function in the editor, typed against the ontology
STEP 05

Expose it as a tool.

One checkbox makes the function available to the agent. The parameter schema tells the model when to call it. That same schema types the arguments in the editor and builds the form you test with.

rhetra / functions
The function listed as an available agent tool
STEP 06

Your agents use it.

From here it's part of what your agents can do. Ask something in plain language and the agent works out this is the right function, ranks the incidents by similarity and lays out what it found. A report about unsafe schedules comes back for a question about fatigue, even though it never uses the word.

rhetra / agent
Ranked incidents returned for a plain-language question about crew fatigue
585 reports text-embedding-3-small, 1536 dims minSimilarity 0.25 1,678ms for the query above

No vector database. No second copy.

The embedding is a column, the vector is a property, the search is a function and the tool is a checkbox. Every one of those is a primitive the rest of the platform already uses.

Get in touch All demos